Skip to content

Commit

Permalink
fix: add workaround to install snappy on Bookworm (#110)
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
  • Loading branch information
NiccoloFei committed Jul 3, 2024
1 parent 96a7733 commit 689d61a
Show file tree
Hide file tree
Showing 14 changed files with 210 additions and 14 deletions.
16 changes: 15 additions & 1 deletion Debian/12/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/12/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/13/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/13/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/14/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/14/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/15/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/15/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/16/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/16/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/17/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --break-system-packages --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --break-system-packages --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/17/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
16 changes: 15 additions & 1 deletion Debian/Dockerfile-beta.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,27 @@ RUN set -xe; \
RUN set -xe; \
apt-get update; \
apt-get install -y --no-install-recommends \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
build-essential python3-dev libsnappy-dev \
python3-pip \
python3-psycopg2 \
python3-setuptools \
; \
pip3 install %%PIP_OPTIONS%% --upgrade pip; \
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
pip3 install %%PIP_OPTIONS%% --no-deps -r requirements.txt; \
# We require build dependencies to build snappy 0.6
# on Python 3.11 or greater.
# TODO: Remove build deps once barman unpins the snappy version or
# https://github.com/EnterpriseDB/barman/issues/905 is completed
apt-get remove -y --purge --autoremove \
build-essential \
python3-dev \
libsnappy-dev \
; \
rm -rf /var/lib/apt/lists/*;

# Change the uid of postgres to 26
Expand Down
Loading

0 comments on commit 689d61a

Please sign in to comment.