Files
firezone/elixir/Dockerfile.postgres-dev
Jamil f6ae7559e8 feat(ci): Add custom postgres Dockerfile for wal2json (#8893)
In order to develop and test WAL replication, we need the wal2json
module installed in our dev postgres image. The module itself builds
very quickly, but I thought it would be better to have this
automatically built and pushed as part of a nightly job so that CI and
developers can make use of it.
2025-04-25 12:31:40 +00:00

20 lines
602 B
Docker

# Builds a Postgres image with needed extensions and modules for local development
# Install wal2json
ARG POSTGRES_VERSION=15
FROM postgres:${POSTGRES_VERSION}-alpine AS builder
RUN apk add --no-cache \
build-base \
git \
llvm \
clang \
curl
ARG WAL2JSON_VERSION=2_6
RUN curl -fssL https://github.com/eulerto/wal2json/archive/refs/tags/wal2json_${WAL2JSON_VERSION}.tar.gz | tar -xzf - -C /tmp --strip-components=1
WORKDIR /tmp
RUN USE_PGXS=1 make && make install
# Prepare final image
FROM postgres:${POSTGRES_VERSION}-alpine
COPY --from=builder /tmp/wal2json.so /usr/local/lib/postgresql/