2018-05-17 22:39:46 +00:00
|
|
|
# Build
|
|
|
|
FROM golang:alpine AS build
|
2015-05-28 23:59:08 +00:00
|
|
|
|
2018-05-17 22:39:46 +00:00
|
|
|
RUN apk add --update git make build-base && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/khlieng/dispatch
|
|
|
|
COPY . /go/src/github.com/khlieng/dispatch
|
2018-12-02 06:39:23 +00:00
|
|
|
RUN chmod +x install.sh && ./install.sh
|
2018-05-17 22:39:46 +00:00
|
|
|
|
|
|
|
# Runtime
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN apk add --update ca-certificates && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
2018-12-02 06:39:23 +00:00
|
|
|
COPY --from=build /go/bin/dispatch /dispatch
|
2018-05-17 22:39:46 +00:00
|
|
|
|
|
|
|
EXPOSE 80/tcp
|
2015-05-28 23:59:08 +00:00
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
2015-12-11 03:35:48 +00:00
|
|
|
ENTRYPOINT ["/dispatch"]
|
2016-01-04 18:26:32 +00:00
|
|
|
CMD ["--dir=/data"]
|