2018-02-01 21:38:43 +08:00
|
|
|
|
2017-10-30 23:24:06 +08:00
|
|
|
FROM golang:alpine
|
|
|
|
|
2018-02-01 21:38:43 +08:00
|
|
|
COPY . /go/src/github.com/filebrowser/filebrowser
|
2017-10-30 23:24:06 +08:00
|
|
|
|
2018-02-01 21:38:43 +08:00
|
|
|
WORKDIR /go/src/github.com/filebrowser/filebrowser
|
2017-10-30 23:24:06 +08:00
|
|
|
RUN apk add --no-cache git
|
|
|
|
RUN go get ./...
|
|
|
|
|
2018-02-01 21:38:43 +08:00
|
|
|
WORKDIR /go/src/github.com/filebrowser/filebrowser/cmd/filebrowser
|
2017-10-30 23:24:06 +08:00
|
|
|
RUN CGO_ENABLED=0 go build -a
|
2018-02-01 21:38:43 +08:00
|
|
|
RUN mv filebrowser /go/bin/filebrowser
|
2017-10-30 23:24:06 +08:00
|
|
|
|
|
|
|
FROM scratch
|
2018-02-01 21:38:43 +08:00
|
|
|
COPY --from=0 /go/bin/filebrowser /filebrowser
|
2017-10-30 23:24:06 +08:00
|
|
|
|
2017-11-11 15:08:12 +08:00
|
|
|
VOLUME /tmp
|
2017-10-30 23:24:06 +08:00
|
|
|
VOLUME /srv
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
COPY Docker.json /config.json
|
|
|
|
|
2018-02-01 21:38:43 +08:00
|
|
|
ENTRYPOINT ["/filebrowser"]
|
2017-10-30 23:24:06 +08:00
|
|
|
CMD ["--config", "/config.json"]
|