Skip to content

Instantly share code, notes, and snippets.

@journey-ad
Created August 5, 2024 09:52
Show Gist options
  • Save journey-ad/77096356f2d65ecd6259b8546f39a1d6 to your computer and use it in GitHub Desktop.
Save journey-ad/77096356f2d65ecd6259b8546f39a1d6 to your computer and use it in GitHub Desktop.
Dockerfile for PostgreSQL 16 with wal2json
FROM postgres:16-alpine
ENV WAL2JSON_COMMIT_ID=wal2json_2_6
RUN apk add --no-cache protobuf-c-dev
RUN apk add --no-cache --virtual .build-deps gcc clang15 llvm15 git make musl-dev pkgconf \
&& git clone https://github.com/eulerto/wal2json -b master --single-branch \
&& (cd /wal2json && git checkout $WAL2JSON_COMMIT_ID && make && make install) \
&& rm -rf wal2json \
&& apk del .build-deps
RUN echo -e "shared_preload_libraries = 'wal2json'\n\
wal_level = logical\n\
max_wal_senders = 4\n\
max_replication_slots = 4" >> /usr/local/share/postgresql/postgresql.conf.sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment