Step 3/10 : RUN apk add --no-cache build-base musl-dev postgresql-dev swig nodejs openssl-dev curl-dev
---> Running in c308435f30fd
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-r1:
conflicts:
libressl-dev-2.6.5-r0[pc:libcrypto=1.0.2o]
libressl-dev-2.6.5-r0[pc:libssl=1.0.2o]
libressl-dev-2.6.5-r0[pc:openssl=1.0.2o]
satisfies: world[openssl-dev]
libressl-dev-2.6.5-r0:
conflicts:
openssl-dev-1.0.2o-r1[pc:libcrypto=2.6.5]
openssl-dev-1.0.2o-r1[pc:libssl=2.6.5]
openssl-dev-1.0.2o-r1[pc:openssl=2.6.5]
satisfies:
postgresql-dev-10.5-r0[libressl-dev]
ERROR: Service 'api' failed to build: The command '/bin/sh -c apk add --no-cache build-base musl-dev postgresql-dev swig nodejs openssl-dev curl-dev' returned a non-zero code: 3
make: *** [build] Error 1
Offer your help. Be nice!
openssl-dev
is needed for the pycurl
package.
Answer by @sneekee from DevChat:
psycopg2-binary
https://github.com/frol/docker-alpine-python3/issues/1
alpine linux is actually more hassle than not with bigger python packages, there are no wheels for alpine for a lot of packages which means you have to manually compile stuff all the time and have those libs present to make things run which bloats the alpine image further i have a 900mb alpine numpy pandas scipy image which totally neuters its potential and any image change forces a 40 minute rebuild. a simple stretch image with all above libs is 1.1G and thats without me bothering to gut said image
aha, you think switching to python-slim is a good idea?
it's actually intended for local development not production
Answer by @sneekee from DevChat:
yeah just do that so much less headache, unless you can keep image size under 200mb its pointless to use alpine