Dockerfile.

This commit is contained in:
Stanislav Nikitin 2021-09-27 17:52:19 +05:00
parent e6366bc70a
commit f1bb1d99a4
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
1 changed files with 18 additions and 0 deletions

18
Dockerfile Normal file
View File

@ -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. <pztrn@pztrn.name>"
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" ]