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