From f1bb1d99a456a0d988d7052a8b86623068ccce8c Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Mon, 27 Sep 2021 17:52:19 +0500 Subject: [PATCH] Dockerfile. --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..69c0818 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM golang:1.17.1-alpine AS build + +WORKDIR /go/src/go.dev.pztrn.name/periodicator +COPY . . + +ENV CGO_ENABLED=0 +RUN go build -o periodicator . + +FROM alpine:latest +LABEL maintainer="Stanislav N. " + +COPY --from=build /go/src/go.dev.pztrn.name/periodicator/periodicator /usr/local/bin/periodicator + +RUN apk add tzdata + +ENV GPT_CONFIG=/periodicator.yaml + +ENTRYPOINT [ "/usr/local/bin/periodicator" ]