Skip to content

Commit c88b191

Browse files
committed
feat: add barman-cloud for compatibility with CNPG
1 parent 50dbb97 commit c88b191

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,26 @@ RUN apt-get update && apt-get upgrade -y && \
6969
apt-get clean && \
7070
rm -rf /var/lib/apt/lists/*
7171

72+
ARG BARMAN_VERSION="3.17.0"
73+
74+
# We need to break the system packages to install barman-cloud in bookworm and later
75+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
76+
77+
USER root
78+
RUN apt-get update && \
79+
apt-get install -y --no-install-recommends \
80+
# We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available
81+
build-essential python3-dev \
82+
python3-pip \
83+
python3-psycopg2 \
84+
python3-setuptools \
85+
&& \
86+
pip3 install --no-cache-dir barman[cloud,azure,snappy,google,zstandard,lz4]==${BARMAN_VERSION} && \
87+
python3 -c "import sysconfig, compileall; compileall.compile_dir(sysconfig.get_path('stdlib'), quiet=1); compileall.compile_dir(sysconfig.get_path('purelib'), quiet=1); compileall.compile_dir(sysconfig.get_path('platlib'), quiet=1)" && \
88+
apt-get remove -y --purge --autoremove build-essential python3-dev && \
89+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
90+
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/*
91+
7292
COPY --from=builder /pgvector_install /
7393
COPY --from=builder /wal-g-v1.1 /usr/local/bin/wal-g-v1.1
7494
COPY --from=builder /wal-g-v2.0.1 /usr/local/bin/wal-g-v2.0.1

0 commit comments

Comments
 (0)