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 \
|
2021-03-06 22:56:16 +00:00
|
|
|
&& go install \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
|
|
|
-mod=readonly
|
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 \
|
2021-03-06 22:56:16 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
ca-certificates
|
2018-10-09 10:52:56 +00:00
|
|
|
|
|
|
|
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:
|