~ Installing cryptography before rust, as recommended

This commit is contained in:
nicobo 2021-02-08 23:05:31 +01:00
parent 527a3de31a
commit 78a5fb44ae
No known key found for this signature in database
GPG key ID: 2581E71C5FA5285F
2 changed files with 14 additions and 4 deletions

View file

@ -14,6 +14,13 @@
FROM python:3-alpine as builder
# Very strange but it seems that cryptography should be installed before rust...
# Although I don't believe there is a wheel for Alpine, doing this way allows
# Debian & Alpine builds to be closer
# https://cryptography.io/en/latest/installation.html#rust
RUN python3 -m pip install --no-cache-dir --user --upgrade pip && \
python3 -m pip install --no-cache-dir --user cryptography; exit 0
# python:3-alpine misses gcc, ffi.h, ...
#
# GCC part :
@ -52,8 +59,7 @@ COPY requirements-*.txt \
setup.py \
.
# This step WILL trigger a compilation on platforms without matching Python wheels
RUN python3 -m pip install --no-cache-dir --user --upgrade pip && \
python3 -m pip install --no-cache-dir --user -r requirements-build.txt -r requirements-runtime.txt
RUN python3 -m pip install --no-cache-dir --user -r requirements-build.txt -r requirements-runtime.txt
# Builds & installs nicobot (should change often, especially the .git directory)
COPY LICENSE \

View file

@ -4,6 +4,11 @@
FROM python:3 as builder
# Very strange but it seems that cryptography should be installed before rust...
# https://cryptography.io/en/latest/installation.html#rust
RUN python3 -m pip install --no-cache-dir --user --upgrade pip && \
python3 -m pip install --no-cache-dir --user cryptography; exit 0
RUN apt-get update && \
# The following fails on arm : https://github.com/docker/buildx/issues/495
apt-get install -y \
@ -34,8 +39,7 @@ COPY requirements-*.txt \
setup.py \
.
# This step WILL trigger a compilation on platforms without matching Python wheels
RUN python3 -m pip install --no-cache-dir --user --upgrade pip && \
python3 -m pip install --no-cache-dir --user -r requirements-build.txt -r requirements-runtime.txt
RUN python3 -m pip install --no-cache-dir --user -r requirements-build.txt -r requirements-runtime.txt
# Builds & installs nicobot (should change often, especially the .git directory)
COPY LICENSE \