willhallonline / docker-ansible

Ansible inside Docker containers: Alpine, Ubuntu, Rocky & Debian with Ansible 2.16, 2.15, 2.14, 2.13, 2.12, 2.11, 2.10 and 2.9 + Mitogen
https://www.willhallonline.co.uk/project/docker/docker-ansible/
MIT License
392 stars 137 forks source link

cryptography python module require rust compiler #33

Closed rayniel95 closed 3 years ago

rayniel95 commented 3 years ago

For some reason in ansible 2.9, dockerfile for alpine 3.12, the cryptography module require compilation with rust compiler. Cryptography module is a dependency. Please check https://cryptography.io/en/latest/installation.html#building-cryptography-on-linux .I not sure if this is only "my problem" or a general issue.

AzuladoToujours commented 3 years ago

Hello! I've experienced this same issue, trying to build the alpine version and the 20.04 of Ubuntu.

There has not been a fix yet, the only one that I could get to build successfully was the Ubuntu 18.04 version, which includes ansiblev2.10.3. Any update will be appreciated.

rayniel95 commented 3 years ago

Hello! I've experienced this same issue, trying to build the alpine version and the 20.04 of Ubuntu.

There has not been a fix yet, the only one that I could get to build successfully was the Ubuntu 18.04 version, which includes ansiblev2.10.3. Any update will be appreciated.

You can modifiy the alpine Dockerfile and build the cryptography python module. Take a look to https://github.com/rayniel95/useful-docker/tree/master/ansible/alpine-plus-python-ansible maybe it help you (delete the proxy line if you will use the Dockerfile).

AzuladoToujours commented 3 years ago

Worked like a charm.

willhallonline commented 3 years ago

There is a bit more of a thread about this on GitLab (where I actually do most of my build testing). https://gitlab.com/who-docker/docker-ansible/-/merge_requests/2

Older Version OS: "Alpine 3.11 fails because the new python cryptography module requires rust version over 1.45 so I've deciced to downgrade it to 3.3.2 version which is not using rust. Ubuntu 16.04 failed because pip 21 does not support python 3.5 so I've pinned its version to 20.3.4 too."

Newer Version OS: Added cargo for build (and required libs) and then removed them after build...