2018-10-09 10:52:56 +00:00
|
|
|
FROM golang:alpine as builder
|
2015-05-25 12:28:50 +00:00
|
|
|
|
2018-10-09 10:52:56 +00:00
|
|
|
COPY . /go/src/github.com/Luzifer/badge-gen
|
2016-06-28 17:40:45 +00:00
|
|
|
WORKDIR /go/src/github.com/Luzifer/badge-gen
|
|
|
|
|
|
|
|
RUN set -ex \
|
2018-10-09 10:52:56 +00:00
|
|
|
&& apk add --update git \
|
|
|
|
&& go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)"
|
2015-05-25 12:28:50 +00:00
|
|
|
|
2018-10-09 10:52:56 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add ca-certificates
|
|
|
|
|
|
|
|
COPY --from=builder /go/bin/badge-gen /usr/local/bin/badge-gen
|
2016-06-28 17:40:45 +00:00
|
|
|
|
2018-10-09 10:52:56 +00:00
|
|
|
EXPOSE 3000
|
2016-07-05 13:48:57 +00:00
|
|
|
VOLUME ["/config"]
|
|
|
|
|
2018-10-09 10:52:56 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/badge-gen"]
|
2016-07-05 13:48:57 +00:00
|
|
|
CMD ["--config", "/config/config.yaml"]
|
2018-10-09 10:52:56 +00:00
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|