filebrowser/Dockerfile
1138-4EB af095a71e7 add ca-certificates to scratch docker image (#478)
Former-commit-id: aa531b84a518c6e4b48edc1231f663c316f36c23 [formerly 2b724b5f31ddbd39b1f9fb6df7ed4cff481b30db] [formerly 8f803379488acbc1149161b7df0eed4455ba876f [formerly 4e454f4bd2]]
Former-commit-id: 1579bebb11497abcdb83a4141af9da8bf681f8a9 [formerly c3943d81a5e4e66b4c1407ea37f30044b65ce593]
Former-commit-id: b26678c4727c4ad42463e25c53b6982efc18330c
2018-07-29 20:20:06 +01:00

26 lines
784 B
Docker

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
VOLUME /tmp
VOLUME /srv
EXPOSE 80
COPY Docker.json /config.json
ENTRYPOINT ["/filebrowser", "--config", "/config.json"]