-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(portability): add Dockerfile for Amazon Linux (#505)
* 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
1 parent
7e1c6d7
commit 1a235c9
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |