From 6b7923466949f9821ab8f41c6ba394ff9ab7416e Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Sat, 28 Apr 2018 20:12:24 +0100 Subject: [PATCH] Fix reuse of compy folder Previously, compy was moved to `/go/src/...` but default GOPATH was created as `/root/go`, so compy was downloaded from Github on each build instead of using locally existing copy. --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12e42bb..b31ba88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN mkdir -p /usr/local/ && \ curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz && \ tar xf go1.9.linux-amd64.tar.gz -C /usr/local -RUN mkdir -p /go/src/github.com/barnacs/compy/ -COPY . /go/src/github.com/barnacs/compy/ -WORKDIR /go/src/github.com/barnacs/compy +RUN mkdir -p /root/go/src/github.com/barnacs/compy/ +COPY . /root/go/src/github.com/barnacs/compy/ +WORKDIR /root/go/src/github.com/barnacs/compy RUN /usr/local/go/bin/go get -d -v ./... RUN /usr/local/go/bin/go build -v @@ -34,8 +34,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ WORKDIR /opt/compy COPY \ --from=compy-builder \ - /go/src/github.com/barnacs/compy/compy \ - /go/src/github.com/barnacs/compy/docker.sh \ + /root/go/src/github.com/barnacs/compy/compy \ + /root/go/src/github.com/barnacs/compy/docker.sh \ /opt/compy/ # TODO: configure HTTP BASIC authentication