Skip to content

Commit

Permalink
feat(portability): add Dockerfile for Amazon Linux (#505)
Browse files Browse the repository at this point in the history
* Create Dockerfile_amazon

* feat(ci): add Amazon Linux Dockerfile

* fix: install xargs on Amazon Linux

* improve the CI matrix names

* fix: install `findutils` to add `xargs`

* fix: allow erasing conflicting dependencies

* try using gnupg2 in Amazon Linux

* try --allowerasing when installing gnupg2

* fix: add replacement for gnupg2
  • Loading branch information
bitcoin-tools authored Apr 4, 2024
1 parent 7e1c6d7 commit 1a235c9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ jobs:
include:
- container: Alpine
dockerfile: ./dockerfiles/Dockerfile_alpine
- container: Amazon
dockerfile: ./dockerfiles/Dockerfile_amazon
- container: Arch
dockerfile: ./dockerfiles/Dockerfile_arch
- container: Debian
Expand Down
26 changes: 26 additions & 0 deletions dockerfiles/Dockerfile_amazon
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1
# Amazon Linux is a Linux server operating system from AWS, optimized for EC2.
# This Dockerfile is ideal for applications that are deployed on AWS and require seamless integration.
FROM amazonlinux:2023
ENV TERM=xterm

# Define the dependencies URL
ARG DEPENDENCIES_URL=https://github.com/bitcoin-tools/nodebuilder/raw/master/dependencies.txt

# Check the current environment
RUN uname -a \
&& cat /etc/os-release \
&& df -h \
&& grep Mem /proc/meminfo \
&& date -u

# Install system updates and dependencies
RUN dnf makecache \
&& dnf --allowerasing --assumeyes install findutils \
&& curl --fail --silent --show-error --location "${DEPENDENCIES_URL}" \
| awk '{if ($0 == "gnupg") print "gnupg2"; else print $0;}' \
| xargs dnf --allowerasing --assumeyes install \
&& dnf clean all

# Download and execute the script
RUN /bin/sh -c "$(curl -fsSL https://github.com/bitcoin-tools/nodebuilder/raw/master/nodebuilder)"

0 comments on commit 1a235c9

Please sign in to comment.