From ab1be2c12d1097e29de4f4913c94ed4084ea531d Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Wed, 1 Nov 2017 19:04:10 -0700 Subject: [PATCH] Improve caching when building gosuper It seems that the ARG ARCH causes a cache miss in the next RUN statement (for some reason our use of cache-from in the other stages of the build works better, but here it always causes a miss). We move the ARG statement to later in the Dockerfile, just before actually using it. Hopefully this will improve caching for most supervisor builds. Change-Type: patch Signed-off-by: Pablo Carranza Velez --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4e1a6c15..ff65cf09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,6 @@ RUN cd /source && bash -ex build.sh # Build golang supervisor FROM debian:jessie-20170723 as gosuper -ARG ARCH RUN apt-get update \ && apt-get install -y \ @@ -95,6 +94,7 @@ WORKDIR /go/src/resin-supervisor/gosuper ENV GOOS linux ENV GO386=387 +ARG ARCH RUN bash ./build.sh RUN rsync -a --delete /go/bin/gosuper /build/