mirror of
https://github.com/tiennm99/keepalive.git
synced 2026-10-11 03:13:31 +00:00
go-redis 9.19.0 to 9.23.0, mongo-driver 2.6.0 to 2.9.2, gocb 2.12.3 to 2.13.0, go-sql-driver/mysql 1.10.0 to 1.10.1, and their transitive modules. The update raises the module's go directive to 1.26, so the builder image moves from golang:1.25-alpine to the moving major tag golang:1-alpine.
12 lines
297 B
Docker
12 lines
297 B
Docker
FROM golang:1-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /out/keepalive .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /out/keepalive /keepalive
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/keepalive"]
|