2017-07-27 09:27:59 +00:00
|
|
|
FROM golang:alpine
|
2017-07-27 13:03:53 +00:00
|
|
|
|
2017-07-27 09:27:59 +00:00
|
|
|
COPY . /go/src/github.com/hacdias/filemanager
|
2017-07-27 13:03:53 +00:00
|
|
|
|
2017-07-27 10:38:09 +00:00
|
|
|
WORKDIR /go/src/github.com/hacdias/filemanager
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
RUN go get ./...
|
2017-07-27 13:03:53 +00:00
|
|
|
|
2017-07-27 10:38:09 +00:00
|
|
|
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager
|
2017-08-04 13:10:23 +00:00
|
|
|
RUN go build -ldflags "-X main.version=$(git tag -l --points-at HEAD)"
|
|
|
|
RUN mv filemanager /go/bin/filemanager
|
2017-07-27 13:03:53 +00:00
|
|
|
|
2017-07-28 07:06:44 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=0 /go/bin/filemanager /usr/local/bin/filemanager
|
|
|
|
|
2017-07-27 13:03:53 +00:00
|
|
|
VOLUME /srv
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
COPY Docker.json /etc/config.json
|
|
|
|
|
2017-07-28 07:06:44 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/filemanager"]
|
2017-07-27 13:03:53 +00:00
|
|
|
CMD ["--config", "/etc/config.json"]
|