Feature/docker (#37) (#38)

* added docker image support
* added environment variable support
* added docker instructions
* added .env hint
This commit is contained in:
T.v.Dein
2024-01-17 14:45:12 +01:00
committed by GitHub
parent 3fd75fa53d
commit 39b064cc20
11 changed files with 174 additions and 2 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM golang:1.21-alpine as builder
RUN apk update
RUN apk upgrade
RUN apk add --no-cache git make
RUN git --version
WORKDIR /work
COPY go.mod .
COPY . .
RUN go mod download
RUN make
FROM alpine:latest
LABEL maintainer="Thomas von Dein <git@daemon.de>"
WORKDIR /app
COPY --from=builder /work/kleingebaeck /app/kleingebaeck
ENV KLEINGEBAECK_OUTDIR /backup
ENV LANG C.UTF-8
USER 1001:1001
ENTRYPOINT ["/app/kleingebaeck"]
CMD ["-h"]