Skip to content

Commit

Permalink
Remove workaround for cryptography package
Browse files Browse the repository at this point in the history
The cryptography package fails to compile on 32-bit architectures
that are QEMU emulated on a 64-bit host. We had a workaround before
where we pinned the version to one that did compile without issues,
but some dependency now needs a newer version which braks everything
again.

Next type of workaround is now to change the filesystem to a tmpfs
one, which apparently does not trigger this bug. More information
is available in the issue:
#30
  • Loading branch information
JonasAlfredsson committed Feb 18, 2022
1 parent f61e5ae commit 30b4609
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_latest.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 90
steps:
- name: Run Docker on tmpfs
uses: JonasAlfredsson/docker-on-tmpfs@main
uses: JonasAlfredsson/docker-on-tmpfs@v1.0.0
with:
tmpfs_size: 4

Expand All @@ -43,7 +43,6 @@ jobs:
linux/arm64
linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
build-args: BUILDX_QEMU_ENV=false
tags: jonasal/nginx-certbot:latest

- name: Print usage info
Expand All @@ -55,9 +54,10 @@ jobs:
docker_buildx_alpine:
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Run Docker on tmpfs
uses: JonasAlfredsson/docker-on-tmpfs@main
uses: JonasAlfredsson/docker-on-tmpfs@v1.0.0
with:
tmpfs_size: 4

Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/build_tags.yml
Expand Up @@ -10,8 +10,13 @@ on:
jobs:
docker_buildx_debian:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 90
steps:
- name: Run Docker on tmpfs
uses: JonasAlfredsson/docker-on-tmpfs@v1.0.0
with:
tmpfs_size: 4

- name: Perform setup steps
uses: JonasAlfredsson/checkout-qemu-buildx@v1.0.0
with:
Expand All @@ -36,7 +41,6 @@ jobs:
pull: true
no-cache: true
push: true
build-args: BUILDX_QEMU_ENV=true
tags: |
jonasal/nginx-certbot:${{ steps.tagger.outputs.APP_MAJOR }}
jonasal/nginx-certbot:${{ steps.tagger.outputs.APP_MAJOR }}.${{ steps.tagger.outputs.APP_MINOR }}
Expand All @@ -45,8 +49,13 @@ jobs:
docker_buildx_alpine:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 180
steps:
- name: Run Docker on tmpfs
uses: JonasAlfredsson/docker-on-tmpfs@v1.0.0
with:
tmpfs_size: 4

- name: Perform setup steps
uses: JonasAlfredsson/checkout-qemu-buildx@v1.0.0
with:
Expand All @@ -66,6 +75,7 @@ jobs:
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
pull: true
no-cache: true
push: true
Expand Down
5 changes: 0 additions & 5 deletions src/Dockerfile
Expand Up @@ -37,11 +37,6 @@ RUN set -ex && \
&& \
# Install the latest version of PIP, Setuptools and Wheel.
curl -L 'https://bootstrap.pypa.io/get-pip.py' | python3 && \
# Handle an extremely specific issue when building the cryptography package for
# 32-bit architectures within QEMU running on a 64-bit host (issue #30).
if [ "${BUILDX_QEMU_ENV}" = "true" ] && [ "$(getconf LONG_BIT)" = "32" ]; then \
pip3 install -U cryptography==3.3.2; \
fi && \
# Install certbot.
pip3 install -U cffi certbot \
# And the supported extra authenticators
Expand Down

0 comments on commit 30b4609

Please sign in to comment.