Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Docker build fails (cryptography) #106

Open
ybizeul opened this issue Oct 3, 2022 · 1 comment
Open

Docker build fails (cryptography) #106

ybizeul opened this issue Oct 3, 2022 · 1 comment

Comments

@ybizeul
Copy link

ybizeul commented Oct 3, 2022

While trying to build :

 => ERROR [ 3/13] RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML     pyOpenSSL flask flask-restful uwsgi netaddr notario &&     /usr/bin/python3 -m pip install -  137.1s 
------                                                                                                                                                                                                     
 > [ 3/13] RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML     pyOpenSSL flask flask-restful uwsgi netaddr notario &&     /usr/bin/python3 -m pip install --no-cache-dir ansible-runner==1.4.6 &&     rm -rf /var/cache/yum:                                                                                                                                                          
#6 1.750 WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead.                                                                         
#6 1.893 Collecting ansible                                                                                                                                                                                
#6 2.918   Downloading https://files.pythonhosted.org/packages/fd/f8/071905c6a67592d0852a9f340f6ab9226861eeeb97fdf4068642b22edcf3/ansible-4.10.0.tar.gz (36.8MB)                                           
#6 129.4 Collecting cryptography
#6 131.9   Downloading https://files.pythonhosted.org/packages/6d/0c/5e67831007ba6cd7e52c4095f053cf45c357739b0a7c46a45ddd50049019/cryptography-38.0.1.tar.gz (599kB)
#6 133.6     Complete output from command python setup.py egg_info:
#6 133.6     
#6 133.6             =============================DEBUG ASSISTANCE==========================
#6 133.6             If you are seeing an error here please try the following to
#6 133.6             successfully install cryptography:
#6 133.6     
#6 133.6             Upgrade to the latest pip and try again. This will fix errors for most
#6 133.6             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
#6 133.6             =============================DEBUG ASSISTANCE==========================
#6 133.6     
#6 133.6     Traceback (most recent call last):
#6 133.6       File "<string>", line 1, in <module>
#6 133.6       File "/tmp/pip-build-guiafx4y/cryptography/setup.py", line 17, in <module>
#6 133.6         from setuptools_rust import RustExtension
#6 133.6     ModuleNotFoundError: No module named 'setuptools_rust'
#6 133.6     
#6 133.6     ----------------------------------------
#6 136.6 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-guiafx4y/cryptography/

Maybe related to #84 ?

I'm building it on Docker for mac, tried both docker build and docker build --platform x86_64

@alexei-28
Copy link

CentOS 7
I try to build by docker, but get error:

docker build .

=> CACHED [ 2/13] RUN yum -y install epel-release  &&     yum -y install bash wget unzip     pexpect python-daemon  bubblewrap gcc     bzip2  openssh openssh-clients python2-psutil    0.0s
 => ERROR [ 3/13] RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML     pyOpenSSL flask flask-restful uwsgi netaddr notario &&     /usr/bin/python3 -m p  28.5s
------                                                                                                                                                                                        
 > [ 3/13] RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML     pyOpenSSL flask flask-restful uwsgi netaddr notario &&     /usr/bin/python3 -m pip install --no-cache-dir ansible-runner==1.4.6 &&     rm -rf /var/cache/yum:                                                                                                                                
#0 0.608 WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead.                                                            
#0 0.628 Collecting ansible                                                                                                                                                                   
#0 1.353   Downloading https://files.pythonhosted.org/packages/fd/f8/071905c6a67592d0852a9f340f6ab9226861eeeb97fdf4068642b22edcf3/ansible-4.10.0.tar.gz (36.8MB)
#0 25.14 Collecting cryptography
#0 25.88   Downloading https://files.pythonhosted.org/packages/6a/f5/a729774d087e50fffd1438b3877a91e9281294f985bda0fd15bf99016c78/cryptography-39.0.1.tar.gz (603kB)
#0 26.20     Complete output from command python setup.py egg_info:
#0 26.20     
#0 26.20             =============================DEBUG ASSISTANCE==========================
#0 26.20             If you are seeing an error here please try the following to
#0 26.20             successfully install cryptography:
#0 26.20     
#0 26.20             Upgrade to the latest pip and try again. This will fix errors for most
#0 26.20             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
#0 26.20             =============================DEBUG ASSISTANCE==========================
#0 26.20     
#0 26.20     Traceback (most recent call last):
#0 26.20       File "<string>", line 1, in <module>
#0 26.20       File "/tmp/pip-build-mha9ekh1/cryptography/setup.py", line 18, in <module>
#0 26.20         from setuptools_rust import RustExtension
#0 26.20     ModuleNotFoundError: No module named 'setuptools_rust'
#0 26.20     
#0 26.20     ----------------------------------------
#0 27.92 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mha9ekh1/cryptography/
------
Dockerfile:12
--------------------
  11 |     
  12 | >>> RUN /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML \
  13 | >>>     pyOpenSSL flask flask-restful uwsgi netaddr notario && \
  14 | >>>     /usr/bin/python3 -m pip install --no-cache-dir ansible-runner==1.4.6 && \
  15 | >>>     rm -rf /var/cache/yum
  16 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /usr/bin/python3 -m pip install ansible cryptography docutils psutil PyYAML     pyOpenSSL flask flask-restful uwsgi netaddr notario &&     /usr/bin/python3 -m pip install --no-cache-dir ansible-runner==1.4.6 &&     rm -rf /var/cache/yum" did not complete successfully: exit code: 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants