Skip to content

Commit

Permalink
Fix docker and workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
adferrand committed Nov 16, 2023
1 parent 3744298 commit 5a493b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ RUN apt-get update -y \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --break-system-packages "poetry==1.5.1"
RUN pip install --break-system-packages "poetry==1.7.1"

RUN cd /tmp/dnsrobocert \
&& poetry export --format constraints.txt --without-hashes > /tmp/dnsrobocert/constraints.txt \
&& poetry build -f wheel

FROM docker.io/python:3.9.13-slim
FROM docker.io/python:3.11.4-slim

COPY --from=constraints /tmp/dnsrobocert/constraints.txt /tmp/dnsrobocert/dist/*.whl /tmp/dnsrobocert/

ENV CONFIG_PATH /etc/dnsrobocert/config.yml
ENV CERTS_PATH /etc/letsencrypt

# Pin cryptography on armv7l arch to latest available and compatible version from pipwheels: 39.0.2
RUN [ "$(uname -m)" = "armv7l" ] && sed -i 's/cryptography==.*/cryptography==39.0.2/' /tmp/dnsrobocert/constraints.txt || true
# Pin cryptography on armv7l arch to latest available and compatible version from pipwheels: 41.0.5
RUN [ "$(uname -m)" = "armv7l" ] && sed -i 's/cryptography==.*/cryptography==41.0.5/' /tmp/dnsrobocert/constraints.txt || true

RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
35 changes: 2 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ acme = "^2"
certbot = "^2"
dns-lexicon = { version = "^3.14.0", extras = [ "full" ] }
importlib-resources = "^6"
# Workaround for: https://github.com/python-poetry/poetry-plugin-export/issues/183
urllib3 = ">=1.25.4,<1.27"
# Optional deps on dns-lexicon
zeep = "*"
xmltodict = "*"
Expand Down

0 comments on commit 5a493b3

Please sign in to comment.