Skip to content

Commit

Permalink
chg: Dockerfile - fix alpine ARM build failures for cryptography
Browse files Browse the repository at this point in the history
Issue: #2368
  • Loading branch information
RazCrimson committed May 7, 2023
1 parent 5dcd2ce commit 8972880
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions docker-files/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion optional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8972880

Please sign in to comment.