From d821395097238ade594e58c42229ced333c98e6d Mon Sep 17 00:00:00 2001 From: Marvin Weck Date: Wed, 1 Aug 2018 11:06:29 +0200 Subject: [PATCH] Revert "Change the order of commands to be able to cache more layers in case of multiple builds triggered in a row" This reverts commit 01362f34ee45b342f4e9148730ccd30027e5aebf. --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c0cf870..024f6be1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ FROM golang:alpine -RUN apk add --no-cache git curl && \ +COPY . /go/src/github.com/filebrowser/filebrowser + +WORKDIR /go/src/github.com/filebrowser/filebrowser +RUN apk --no-cache --update upgrade && apk --no-cache add ca-certificates git curl && \ curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 && \ chmod +x /usr/local/bin/dep - -COPY . /go/src/github.com/filebrowser/filebrowser -WORKDIR /go/src/github.com/filebrowser/filebrowser RUN dep ensure -vendor-only + WORKDIR /go/src/github.com/filebrowser/filebrowser/cmd/filebrowser RUN CGO_ENABLED=0 go build -a RUN mv filebrowser /go/bin/filebrowser @@ -14,6 +15,7 @@ RUN mv filebrowser /go/bin/filebrowser FROM scratch COPY --from=0 /go/bin/filebrowser /filebrowser COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + VOLUME /tmp VOLUME /srv EXPOSE 80