Merge 1488639444 into c0531c129a
This commit is contained in:
commit
2927054eda
21
Dockerfile
21
Dockerfile
@ -1,11 +1,19 @@
|
||||
FROM golang:alpine
|
||||
|
||||
COPY . /go/src/github.com/filebrowser/filebrowser
|
||||
ARG FBURL=https://github.com/filebrowser/filebrowser
|
||||
ARG DPURL=https://api.github.com/repos/golang/dep/releases/latest
|
||||
|
||||
RUN apk add --no-cache git curl
|
||||
|
||||
WORKDIR /go/src/github.com/filebrowser
|
||||
RUN git clone ${FBURL}
|
||||
# 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 curl -fsSL "$(curl -s "${DPURL}" \
|
||||
| grep -i 'browser_download_url.*linux-amd64"' \
|
||||
| cut -d '"' -f 4)" -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep
|
||||
RUN dep ensure -vendor-only
|
||||
|
||||
WORKDIR /go/src/github.com/filebrowser/filebrowser/cmd/filebrowser
|
||||
@ -15,10 +23,11 @@ RUN mv filebrowser /go/bin/filebrowser
|
||||
FROM scratch
|
||||
COPY --from=0 /go/bin/filebrowser /filebrowser
|
||||
|
||||
COPY --from=0 /go/src/github.com/filebrowser/filebrowser/Docker.json /config.json
|
||||
# COPY Docker.json /config.json
|
||||
|
||||
VOLUME /tmp
|
||||
VOLUME /srv
|
||||
EXPOSE 80
|
||||
|
||||
COPY Docker.json /config.json
|
||||
|
||||
ENTRYPOINT ["/filebrowser", "--config", "/config.json"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user