2017-07-27 17:27:59 +08:00
|
|
|
FROM golang:alpine
|
2017-07-27 21:03:53 +08:00
|
|
|
|
2017-07-27 17:27:59 +08:00
|
|
|
COPY . /go/src/github.com/hacdias/filemanager
|
2017-07-27 21:03:53 +08:00
|
|
|
|
2017-07-27 18:38:09 +08:00
|
|
|
WORKDIR /go/src/github.com/hacdias/filemanager
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
RUN go get ./...
|
2017-07-27 21:03:53 +08:00
|
|
|
|
2017-07-27 18:38:09 +08:00
|
|
|
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager
|
2017-09-07 21:15:25 +08:00
|
|
|
RUN CGO_ENABLED=0 go build -a
|
2017-08-04 21:10:23 +08:00
|
|
|
RUN mv filemanager /go/bin/filemanager
|
2017-07-27 21:03:53 +08:00
|
|
|
|
2017-09-07 21:15:25 +08:00
|
|
|
FROM scratch
|
|
|
|
COPY --from=0 /go/bin/filemanager /filemanager
|
2017-07-28 15:06:44 +08:00
|
|
|
|
2017-07-27 21:03:53 +08:00
|
|
|
VOLUME /srv
|
|
|
|
EXPOSE 80
|
|
|
|
|
2017-09-07 21:15:25 +08:00
|
|
|
COPY Docker.json /config.json
|
2017-07-27 21:03:53 +08:00
|
|
|
|
2017-09-07 21:15:25 +08:00
|
|
|
ENTRYPOINT ["/filemanager"]
|
|
|
|
CMD ["--config", "/config.json"]
|