From f2438e490fd495c168f2890f5e473591ad48f3fe Mon Sep 17 00:00:00 2001 From: NI Date: Sun, 8 Sep 2019 20:43:12 +0800 Subject: [PATCH] Don't send source code when we're building base image. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 741a32f4..27787bd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ # Build the build base environment FROM debian:sid AS base -COPY . /tmp/.build/sshwifty RUN set -ex && \ cd / && \ - ls -l /tmp/.build/sshwifty && \ 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:/ && \ @@ -14,7 +12,9 @@ RUN set -ex && \ # Build the base environment for application libraries FROM base AS libbase +COPY . /tmp/.build/sshwifty RUN set -ex && \ + ls -l /tmp/.build/sshwifty && \ cd / && \ export PATH=$PATH:/ && \ ([ -z "$HTTP_PROXY" ] || (git config --global http.proxy "$HTTP_PROXY" && npm config set proxy "$HTTP_PROXY")) && \