From fb5f133b4711001831196ae8449af31544bf43fe Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 10 Dec 2020 22:39:37 +0100 Subject: [PATCH] Add Dockerfile Signed-off-by: Knut Ahlers --- Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d244529 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM golang:alpine as builder + +COPY . /go/src/github.com/Luzifer/twitch-manager +WORKDIR /go/src/github.com/Luzifer/twitch-manager + +RUN set -ex \ + && apk add --update git \ + && go install \ + -ldflags "-X main.version=$(git describe --tags --always || echo dev)" \ + -mod=readonly + +FROM alpine:latest + +LABEL maintainer "Knut Ahlers " + +RUN set -ex \ + && apk --no-cache add \ + ca-certificates + +COPY --from=builder /go/bin/twitch-manager /usr/local/bin/twitch-manager + +EXPOSE 3000 +VOLUME ["/data"] + +ENTRYPOINT ["/usr/local/bin/twitch-manager"] +CMD ["--"] + +# vim: set ft=Dockerfile: