From bc3b60aef93d24ac3177247251319d8c19a7bcc4 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 5 Aug 2019 23:56:18 +0800 Subject: [PATCH] Simplify Dockerfile with `WORKDIR /tmp` --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e5280a..cb51ad0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,9 +12,9 @@ RUN apk --no-cache upgrade && apk add --no-cache $RUNTIME_DEPS && \ ENV UNBOUND_GIT_URL https://github.com/jedisct1/unbound.git ENV UNBOUND_GIT_REVISION 4edb15ba417c78710069a5be8be3a6b5d8bdba9c +WORKDIR /tmp + RUN apk add --no-cache $BUILD_DEPS && \ - mkdir -p /tmp/src && \ - cd /tmp/src && \ git clone --depth=1000 "$UNBOUND_GIT_URL" && \ cd unbound && \ git checkout "$UNBOUND_GIT_REVISION" && \ @@ -31,8 +31,6 @@ RUN apk add --no-cache $BUILD_DEPS && \ ENV LIBSODIUM_GIT_URL https://github.com/jedisct1/libsodium.git RUN apk add --no-cache $BUILD_DEPS && \ - mkdir -p /tmp/src && \ - cd /tmp/src && \ git clone --depth=1 --branch stable "$LIBSODIUM_GIT_URL" && \ cd libsodium && \ env CFLAGS=-Ofast ./configure --disable-dependency-tracking && \ @@ -47,8 +45,6 @@ ENV DNSCRYPT_WRAPPER_GIT_BRANCH xchacha-stamps COPY queue.h /tmp RUN apk add --no-cache $BUILD_DEPS && \ - mkdir -p /tmp/src && \ - cd /tmp/src && \ git clone --depth=1 --branch="${DNSCRYPT_WRAPPER_GIT_BRANCH}" "${DNSCRYPT_WRAPPER_GIT_URL}" && \ cd dnscrypt-wrapper && \ sed -i 's##"/tmp/queue.h"#' compat.h && \