mirror of
https://github.com/tiennm99/db-keepalive.git
synced 2026-05-14 07:52:20 +00:00
ff913539bd
Consolidates the *-keepalive family (redis, valkey, postgresql, mysql, mongodb, couchbase) into a single binary with a runtime DB_TYPE dispatch and an Adapter interface. Original repos archived with a pointer here.
12 lines
312 B
Docker
12 lines
312 B
Docker
FROM golang:1.23-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/db-keepalive .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /out/db-keepalive /db-keepalive
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/db-keepalive"]
|