added dockerfile

This commit is contained in:
2024-12-18 18:46:49 +01:00
parent 83f818450c
commit 4427f12481
2 changed files with 48 additions and 0 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
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/anydb /app/anydb
ENV LANG C.UTF-8
USER 1001:1001
ENTRYPOINT ["/app/anydb"]
CMD ["-h"]