Cannot "Pip Install Cryptography" in Docker Alpine Linux 3.3 with Openssl 1.0.2G and Python 2.7

Makefile Errors while building megasdk python in Alpine Edge Docker

Thank you @mpb I had added the -fpermissive flag as you told and the errors were actually downgraded to warnings also my built code is working very well

Fix :

https://github.com/AmirulAndalib/MLTB-ALPINE-DOCKER/blob/master/Dockerfile%20Base/Dockerfile#L45

thank you very much for helping

Alpine 3.3, Python 2.7.11, urllib2 causing SSL: CERTIFICATE_VERIFY_FAILED

You need to install ca-certificates to be able to validate signed certs by public CAs:

FROM alpine:3.3
RUN apk --no-cache add python ca-certificates
CMD ["python", "-c", "import urllib2; response = urllib2.urlopen('https://www.python.org')"]

Install older package version in Alpine

Unfortunately, Alpine packages are always updated in place to the latest version, and older versions are discarded. This could be painful, indeed...

Usually, when a package is updated, it's updated with all Alpine distro versions that it's compatible to. For example, postgresql-client was bumped to 12.4-r0 on edge, v3.12 and v3.11, but on Alpine v3.10 repos you'll still find 11.9-r0. In case this was enough, the old version could be installed from the desired repository, as long as it lasts, using:

apk add postgresql-client=11.9-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main

However, since 12.3 doesn't live in the official Alpine repositories anymore, you could rely on an external Docker image, instead.

Luckily, the postgres official images has version tags, and you can find the desired Alpine image for 12.3:

$ wget -q https://registry.hub.docker.com/v1/repositories/postgres/tags -O - | jq -r '.[].name' | grep 12.3
12.3
12.3-alpine

Therefore, you can use FROM:postgres:12.3-alpine to get the desired version from.

In tougher cases, where the Alpine package version is updated, and couldn't be found in other images, the only resort may be building from source.



Related Topics



Leave a reply



Submit