From 823e66d81efedea48461559a6b367e314f2eb8a1 Mon Sep 17 00:00:00 2001 From: NI Date: Tue, 17 Sep 2019 09:46:59 +0800 Subject: [PATCH] Fixed the Dockerfile so Docker can compile on Arm from the source code --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e9ebdb0..c11db9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN set -ex && \ echo 'res=0; for i in $(seq 0 36); do $@; res=$?; [ $res -eq 0 ] && exit $res || sleep 10; done; exit $res' > /try.sh && chmod +x /try.sh && \ echo 'cpid=""; ret=0; i=0; for c in "$@"; do ( (((((eval $c; echo $? >&3) | sed "s/^/|-($i) /" >&4) 2>&1 | sed "s/^/|-($i)!/" >&2) 3>&1) | (read xs; exit $xs)) 4>&1) & ppid=$!; cpid="$cpid $ppid"; echo "+ Child $i (PID $ppid): $c ..."; i=$((i+1)); done; for c in $cpid; do wait $c; cret=$?; [ $cret -eq 0 ] && continue; echo "* Child PID $c has failed." >&2; ret=$cret; done; exit $ret' > /child.sh && chmod +x /child.sh && \ export PATH=$PATH:/ && \ - echo 'apt-get update && apt-get install build-essential git npm golang-go -y' > /install.sh && chmod +x /install.sh && \ + echo 'apt-get update && apt-get install autoconf automake libtool build-essential git npm golang-go -y' > /install.sh && chmod +x /install.sh && \ ([ -z "$HTTP_PROXY" ] || (echo "Acquire::http::Proxy \"$HTTP_PROXY\";" >> /etc/apt/apt.conf)) && \ ([ -z "$HTTPS_PROXY" ] || (echo "Acquire::https::Proxy \"$HTTPS_PROXY\";" >> /etc/apt/apt.conf)) && \ try.sh install.sh && rm /install.sh @@ -14,6 +14,7 @@ RUN set -ex && \ FROM base AS libbase COPY . /tmp/.build/sshwifty RUN set -ex && \ + apt-get install libpng-dev -y && \ ls -l /tmp/.build/sshwifty && \ cd / && \ export PATH=$PATH:/ && \