|
4 | 4 | #################### |
5 | 5 | # Stage 1: Nix builder |
6 | 6 | #################### |
7 | | -FROM alpine:3.21 AS nix-builder |
| 7 | +FROM alpine:3.23 AS nix-builder |
8 | 8 |
|
9 | 9 | # Install dependencies for nix installer (coreutils for GNU cp, sudo for installer) |
10 | 10 | RUN apk add --no-cache \ |
@@ -48,27 +48,28 @@ RUN nix store gc |
48 | 48 | #################### |
49 | 49 | # Stage 2: Gosu builder |
50 | 50 | #################### |
51 | | -FROM alpine:3.21 AS gosu-builder |
| 51 | +FROM alpine:3.23 AS gosu-builder |
52 | 52 |
|
53 | 53 | ARG TARGETARCH |
54 | | -ARG GOSU_VERSION=1.16 |
55 | | - |
56 | | -RUN apk add --no-cache gnupg curl |
57 | | - |
58 | | -# Download and verify gosu |
59 | | -RUN curl -fsSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${TARGETARCH}" -o /usr/local/bin/gosu && \ |
60 | | - curl -fsSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${TARGETARCH}.asc" -o /usr/local/bin/gosu.asc && \ |
61 | | - GNUPGHOME="$(mktemp -d)" && \ |
62 | | - export GNUPGHOME && \ |
63 | | - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ |
64 | | - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ |
65 | | - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ |
| 54 | +ARG GOSU_VERSION=1.19 |
| 55 | +ARG GO_VERSION=1.26.1 |
| 56 | + |
| 57 | +RUN apk add --no-cache curl git |
| 58 | + |
| 59 | +# Install Go |
| 60 | +RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz" | tar -C /usr/local -xz |
| 61 | +ENV PATH="/usr/local/go/bin:${PATH}" |
| 62 | + |
| 63 | +# Build gosu from source |
| 64 | +RUN git clone --depth 1 --branch "${GOSU_VERSION}" https://github.com/tianon/gosu.git /gosu && \ |
| 65 | + cd /gosu && \ |
| 66 | + CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/gosu . && \ |
66 | 67 | chmod +x /usr/local/bin/gosu |
67 | 68 |
|
68 | 69 | #################### |
69 | 70 | # Stage 3: Final production image |
70 | 71 | #################### |
71 | | -FROM alpine:3.21 AS production |
| 72 | +FROM alpine:3.23 AS production |
72 | 73 |
|
73 | 74 | # Install minimal runtime dependencies |
74 | 75 | RUN apk add --no-cache \ |
@@ -154,7 +155,7 @@ COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00- |
154 | 155 |
|
155 | 156 | # Add entrypoint script |
156 | 157 | ADD --chmod=0755 \ |
157 | | - https://github.com/docker-library/postgres/raw/889f9447cd2dfe21cccfbe9bb7945e3b037e02d8/15/bullseye/docker-entrypoint.sh \ |
| 158 | + https://raw.githubusercontent.com/docker-library/postgres/6edb0a8c4def40c371514b34aef9037ec82d9110/15/alpine3.23/docker-entrypoint.sh \ |
158 | 159 | /usr/local/bin/docker-entrypoint.sh |
159 | 160 |
|
160 | 161 | # Setup pgsodium key script |
|
0 commit comments