2024-12-01 13:25:30 +00:00
|
|
|
FROM golang:1.23.3 as build
|
|
|
|
WORKDIR /workdir
|
|
|
|
COPY go.mod go.sum /workdir/
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . /workdir
|
|
|
|
RUN go build -ldflags='-s -w' -o app .
|
|
|
|
|
|
|
|
FROM debian:bookworm-slim
|
2024-12-01 14:24:04 +00:00
|
|
|
RUN apt update && apt upgrade && apt install ca-certificates openssl
|
2024-12-01 13:25:30 +00:00
|
|
|
COPY --from=build /workdir/app app
|
|
|
|
ENTRYPOINT ["/app"]
|