mirror of
https://github.com/tiennm99/keepalive.git
synced 2026-07-17 02:16:56 +00:00
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"]
|