forked from repo-mirrors/cnpg-postgres-containers
chore: fix LZ4 builds on arm64 (#162)
build-essential and python3-dev are required to build LZ4 on arm64 since there aren't pre-compiled wheel available for this architecture. Also, switch back to using the latest qemu image. Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
This commit is contained in:
2
.github/workflows/bake.yaml
vendored
2
.github/workflows/bake.yaml
vendored
@@ -48,8 +48,6 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: 'arm64'
|
platforms: 'arm64'
|
||||||
# TODO: remove once https://github.com/docker/setup-qemu-action/issues/198 is fixed
|
|
||||||
image: 'tonistiigi/binfmt:qemu-v7.0.0'
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -45,8 +45,6 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
# TODO: remove once https://github.com/docker/setup-qemu-action/issues/198 is fixed
|
|
||||||
image: 'tonistiigi/binfmt:qemu-v7.0.0'
|
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
env:
|
env:
|
||||||
|
@@ -41,6 +41,8 @@ RUN set -xe; \
|
|||||||
RUN set -xe; \
|
RUN set -xe; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
|
# We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available
|
||||||
|
build-essential python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-psycopg2 \
|
python3-psycopg2 \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
@@ -48,6 +50,7 @@ RUN set -xe; \
|
|||||||
pip3 install %%PIP_OPTIONS%% --upgrade pip; \
|
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; \
|
pip3 install %%PIP_OPTIONS%% --no-deps -r requirements.txt; \
|
||||||
|
apt-get remove -y --purge --autoremove build-essential python3-dev; \
|
||||||
rm -rf /var/lib/apt/lists/*;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
# Change the uid of postgres to 26
|
# Change the uid of postgres to 26
|
||||||
|
@@ -43,6 +43,8 @@ RUN set -xe; \
|
|||||||
RUN set -xe; \
|
RUN set -xe; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
|
# We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available
|
||||||
|
build-essential python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-psycopg2 \
|
python3-psycopg2 \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
@@ -50,6 +52,7 @@ RUN set -xe; \
|
|||||||
pip3 install %%PIP_OPTIONS%% --upgrade pip; \
|
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; \
|
pip3 install %%PIP_OPTIONS%% --no-deps -r requirements.txt; \
|
||||||
|
apt-get remove -y --purge --autoremove build-essential python3-dev; \
|
||||||
rm -rf /var/lib/apt/lists/*;
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
# Change the uid of postgres to 26
|
# Change the uid of postgres to 26
|
||||||
|
Reference in New Issue
Block a user