Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alpine ARM image builds failures due to cryptography dependency #2371

Merged
merged 1 commit into from
May 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docker-files/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -29,8 +29,10 @@ RUN apk add --no-cache \
smartmontools \
iputils \
tzdata \
# Required for 'cryptography' dependency
gcc libffi-dev openssl-dev cargo pkgconfig
# Required for 'cryptography' dependency of optional requirement 'cassandra-driver' \
# Refer: https://cryptography.io/en/latest/installation/#alpine \
# `git` required to clone cargo crates (dependencies)
gcc libffi-dev openssl-dev cargo pkgconfig git

##############################################################################
# Install the dependencies beforehand to make them cacheable
@@ -58,9 +60,14 @@ RUN pip3 install --no-cache-dir --user glances
FROM build as buildOptionalRequirements
ARG PYTHON_VERSION

# Required for optional dependency cassandra-driver
ENV CASS_DRIVER_NO_CYTHON=1
# See issue 2368
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

COPY requirements.txt .
COPY optional-requirements.txt .
RUN CASS_DRIVER_NO_CYTHON=1 pip3 install --no-cache-dir --user -r optional-requirements.txt
RUN pip3 install --no-cache-dir --user -r optional-requirements.txt

##############################################################################
# full image
2 changes: 1 addition & 1 deletion optional-requirements.txt
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
batinfo
bernhard
bottle
#cassandra-driver # cassandra-driver breaks Glances CI (Alpine Docker). See detail in issue #2368
cassandra-driver
chevron
couchdb
docker==6.0.1