add filebrowser/filebrowser:dev, move dep execution to build.sh

This commit is contained in:
1138-4EB authored and Henrique Dias committed 2018-08-05 10:58:21 +01:00
1 parent f91ee24858
commit d11aa8de6b
4 files changed
+24 -16

No files matched your search

+1 -8
View File
@@ -1,20 +1,13 @@
FROM golang:alpine
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
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
FROM scratch
COPY --from=0 /go/bin/filebrowser /filebrowser
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=filebrowser/dev /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
VOLUME /tmp
VOLUME /srv