Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
ARG PG_MAJOR=18

# The upstream image ships gosu built with Go 1.24.6; rebuild it with a patched Go.
FROM --platform=$BUILDPLATFORM golang:1.27.4-trixie AS gosu

ARG GOSU_VERSION=1.20
ARG TARGETARCH

WORKDIR /src
RUN git clone --depth 1 --branch "${GOSU_VERSION}" https://github.com/tianon/gosu.git . && \
CGO_ENABLED=0 GOARCH="${TARGETARCH}" go build -trimpath -ldflags '-d -w' -o /gosu .

FROM postgres:${PG_MAJOR}

ARG PG_MAJOR

COPY --from=gosu /gosu /usr/local/bin/gosu

# hadolint ignore=DL3008
RUN apt-get update && \
RUN gosu nobody true && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
postgresql-${PG_MAJOR}-pgvector \
Expand Down
Loading