Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Fix Docker build
Browse files Browse the repository at this point in the history
At some point Alpine switched from openssl to libressl. For some reason
this caused an error to appear during last week:

    Step 17/24 : RUN apk add [...]

     ---> Running in 52e7e742d29e
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
    ERROR: unsatisfiable constraints:
      openssl-dev-1.0.2o-r0:
	conflicts:
		   libressl-dev-2.6.3-r0[pc:libcrypto=1.0.2o]
		   libressl-dev-2.6.3-r0[pc:libssl=1.0.2o]
		   libressl-dev-2.6.3-r0[pc:openssl=1.0.2o]
      libressl-dev-2.6.3-r0:
	conflicts:
		   openssl-dev-1.0.2o-r0[pc:libcrypto=2.6.3]
		   openssl-dev-1.0.2o-r0[pc:libssl=2.6.3]
		   openssl-dev-1.0.2o-r0[pc:openssl=2.6.3]
	satisfies:
		   postgresql-dev-10.4-r0[libressl-dev]
      build-dependencies-0:
	masked in: cache
	satisfies: world[build-dependencies]

Switching to libressl solved that issue but the the cryptography python package
build was failing:

    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.5m -c build/temp.linux-x86_64-3.5/_openssl.c -o build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/_openssl.o
    In file included from /usr/include/openssl/x509.h:595:0,
                     from /usr/include/openssl/engine.h:96,
                     from build/temp.linux-x86_64-3.5/_openssl.c:567:
    build/temp.linux-x86_64-3.5/_openssl.c:3467:19: error: expected identifier or '(' before numeric constant
     static const long X509_V_ERR_HOSTNAME_MISMATCH = 0;
                       ^
    build/temp.linux-x86_64-3.5/_openssl.c:3468:19: error: expected identifier or '(' before numeric constant
     static const long X509_V_ERR_EMAIL_MISMATCH = 0;
                       ^
    build/temp.linux-x86_64-3.5/_openssl.c:3469:19: error: expected identifier or '(' before numeric constant
     static const long X509_V_ERR_IP_ADDRESS_MISMATCH = 0;
                       ^
    error: command 'gcc' failed with exit status 1

Upgrading to the latest version solved the issue and the Docker build now works.
  • Loading branch information
amercader committed May 24, 2018
1 parent 92fad52 commit d235660
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apk add --no-cache --virtual build-dependencies \
build-base \
linux-headers \
python3-dev \
openssl-dev \
libressl-dev \
readline-dev \
curl \
postgresql-dev \
Expand All @@ -51,7 +51,7 @@ RUN apk add --no-cache --virtual build-dependencies \
bash \
gettext \
ca-certificates \
openssl \
libressl \
libpq \
libjpeg-turbo \
libpng \
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
alembic==0.8.9
boto3==1.4.4
celery==4.0.0
cryptography==1.7.2
cryptography==2.2.2
flask==0.11.1
flask-cors==3.0.2
flask-login==0.4.0
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
#
alembic==0.8.9
amqp==2.2.2 # via kombu
asn1crypto==0.24.0 # via cryptography
babel==2.5.1 # via flower
billiard==3.5.0.3 # via celery
blinker==1.4 # via raven
boto3==1.4.4
botocore==1.5.95 # via boto3, s3transfer
cchardet==1.1.3 # via datapackage, tabulator
celery==4.0.0
cffi==1.11.2 # via cryptography
cffi==1.11.5 # via cryptography
click==6.7 # via datapackage, flask, goodtables, python-dotenv, tableschema, tabulator
contextlib2==0.5.5 # via raven
cryptography==1.7.2
cryptography==2.2.2
datapackage==1.1.4 # via goodtables
docutils==0.14 # via botocore, statistics
et-xmlfile==1.0.1 # via openpyxl
Expand Down

0 comments on commit d235660

Please sign in to comment.