filebrowser/Dockerfile
1138-4EB dd2d02e492 fix309: merge CMD in the dockerfile to ENTRYPOINT (#397)
Former-commit-id: ca81d11e477ac00abf2998b69425f00a0fa9bfd3 [formerly 262790d3b7ddd904b38fc926658e275531ced99b] [formerly 7d2d31e627d5df0d2f78362a43a27d80725dd4be [formerly f7fdd6cc92]]
Former-commit-id: 097da2311051673f5bea9f851f1451938a7d1935 [formerly b7922bd40d932e03493345cdaca0541150d9a44e]
Former-commit-id: 6b915b5d648575b857d51dc885de675616509d18
2018-04-18 11:53:22 +01:00

25 lines
649 B
Docker

FROM golang:alpine
COPY . /go/src/github.com/filebrowser/filebrowser
WORKDIR /go/src/github.com/filebrowser/filebrowser
RUN apk add --no-cache 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
VOLUME /tmp
VOLUME /srv
EXPOSE 80
COPY Docker.json /config.json
ENTRYPOINT ["/filebrowser", "--config", "/config.json"]