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

Conversation

@ChuckCox
Copy link
Member

@ChuckCox ChuckCox commented Nov 9, 2021

Fixes the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/opt/app-root/lib64/python3.9/site-packages/pip/_vendor/certifi/cacert.pem'
The command '/bin/sh -c pipenv install --dev' returned a non-zero code: 1
FAILED
An error exit status 1 was encountered while building the Docker image.

Fixes the following error:  
```
FileNotFoundError: [Errno 2] No such file or directory: '/opt/app-root/lib64/python3.9/site-packages/pip/_vendor/certifi/cacert.pem'
The command '/bin/sh -c pipenv install --dev' returned a non-zero code: 1
FAILED
An error exit status 1 was encountered while building the Docker image.
```
@ChuckCox
Copy link
Member Author

ChuckCox commented Nov 9, 2021

ibmcloud dev build --trace

IBM Cloud CLI version:    2.2.0-rc+064530f-2021-11-02T13:40:12+00:00
dev plugin version:       2.9.1
cr plugin version:        0.1.550
ks plugin version:        1.0.334
cf plugin version:        6.53.0+8e2b70a4a.2020-10-01
docker version:           20.10.10, build b485636
docker-compose version:   1.23.2, build 1110ad01
kubectl version:          MISSING
helm version:             MISSING
git version:              2.17.1

API endpoint:      https://cloud.ibm.com   
Region:            us-south   
User:              arftt@us.ibm.com   
Account:           arftt (8ce28e90b64ccd43b7d7c0898bf97544) <-> 1594217   
Resource group:    default   
CF API endpoint:   https://api.us-south.cf.cloud.ibm.com (API version: 2.172.0)   
Org:               arftt@us.ibm.com   
Space:             test


IBM Cloud CLI version:    2.2.0-rc+064530f-2021-11-02T13:40:12+00:00
dev plugin version:       2.9.1
cr plugin version:        0.1.550
ks plugin version:        1.0.334
cf plugin version:        6.53.0+8e2b70a4a.2020-10-01
docker version:           20.10.10, build b485636
docker-compose version:   1.23.2, build 1110ad01
kubectl version:          MISSING
helm version:             MISSING
git version:              2.17.1

API endpoint:      https://cloud.ibm.com   
Region:            us-south   
User:              arftt@us.ibm.com   
Account:           arftt (8ce28e90b64ccd43b7d7c0898bf97544) <-> 1594217   
Resource group:    default   
CF API endpoint:   https://api.us-south.cf.cloud.ibm.com (API version: 2.172.0)   
Org:               arftt@us.ibm.com   
Space:             test

No service credentials were detected for the app to download.

Validating Docker image name
OK
Using these variable values:
01: ContainerName string = 
02: ContainerNameRun string = c1flaskapppynoauthcrlinuxmanualk81-flask-run
03: ContainerNameTools string = c1flaskapppynoauthcrlinuxmanualk81-flask-tools
04: ContainerBuildTarget string = 
05: HostPathRun string = .
06: HostPathTools string = .
07: ContainerPathRun string = /opt/app-root/src
08: ContainerPathTools string = /opt/app-root/src
09: IsUseRootUserTools bool = false
10: BuildCmdRun string = python manage.py build
11: BuildCmdDebug string = python manage.py build
12: TestCmd string = python manage.py test
13: DebugCmd string = python manage.py debug
14: RunCmd string = 
15: ContainerPortMap string = 3000:3000
16: ContainerPortMapDebug string = 5858:5858
17: ImageNameTools string = c1flaskapppynoauthcrlinuxmanualk81-flask-tools
18: ImageNameRun string = c1flaskapppynoauthcrlinuxmanualk81-flask-run
19: DockerfileRun string = Dockerfile
20: DockerfileTools string = Dockerfile-tools
21: ContainerMountsRun []map[string]string = []
22: ContainerMountsTools []map[string]string = []
23: IsDebug bool = false
24: IsTrace bool = true
25: IsJSON bool = false
26: IsVerbose bool = false
27: Version string = 0.0.3
28: DeployTarget string = 
29: IsForce bool = false
30: Language string = 
31: IbmCluster string = 
32: OpenshiftAPIKey string = 
33: ClusterRole string = cluster-admin
34: ClusterServiceAccount string = kube-system:default
35: ChartPath string = chart/c1flaskapppynoauthcrlinuxmanualk81
36: DockerRegistry string = 
37: GeneratedID string = 
38: CredsFilepath string = 
39: NoOpen bool = false
40: Output string = 
41: WebAppRoot string = 
42: ContainerShell string = /bin/sh
43: ContainerShellTarget string = tools
44: AppID string = 5f73c2c9-42b3-4cd9-a872-dfeaee89b12d
45: Hostname string = 
46: Domain string = 
47: JobID string = 
48: JobExecID string = 
49: StageID string = 
50: RunID string = 
51: TaskName string = 
52: TriggerName string = 
Checking if Docker container c1flaskapppynoauthcrlinuxmanualk81-flask-tools is running
OK
Checking Docker image history to see if image already exists
OK
Creating image c1flaskapppynoauthcrlinuxmanualk81-flask-tools based on Dockerfile-tools ...

Executing docker image build --file Dockerfile-tools --tag c1flaskapppynoauthcrlinuxmanualk81-flask-tools --rm --pull --build-arg bx_dev_userid=0 --build-arg bx_dev_user=root .
Waiting for Docker image to build
Sending build context to Docker daemon  226.8kB
Step 1/18 : FROM registry.access.redhat.com/ubi8/python-39:1
1: Pulling from ubi8/python-39
Digest: sha256:ebcab2b02afa26f44396cecc8aabbaba7d780513ea16fbc3fbd01db5720be7a5
Status: Image is up to date for registry.access.redhat.com/ubi8/python-39:1
 ---> bb7ba7ac81b0
Step 2/18 : WORKDIR /opt/app-root/src
 ---> Using cache
 ---> ebe465b12428
Step 3/18 : COPY Pipfile* /opt/app-root/src/
 ---> Using cache
 ---> 94f57dea114b
Step 4/18 : USER root
 ---> Using cache
 ---> 53bc06241168
Step 5/18 : RUN yum -y install --disableplugin=subscription-manager wget   && yum --disableplugin=subscription-manager clean all
 ---> Using cache
 ---> 21b69447bb64
Step 6/18 : RUN pip3 install --upgrade pip==21.3.1   && pip3 install --upgrade pipenv==2020.11.15   && pipenv install --dev
 ---> Running in 5b846c6642bc
Collecting pip==21.3.1
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
Successfully installed pip-21.3.1
Collecting pipenv==2020.11.15
  Downloading pipenv-2020.11.15-py2.py3-none-any.whl (3.9 MB)
Collecting virtualenv-clone>=0.2.5
  Downloading virtualenv_clone-0.5.7-py3-none-any.whl (6.6 kB)
Collecting virtualenv
  Downloading virtualenv-20.10.0-py2.py3-none-any.whl (5.6 MB)
Requirement already satisfied: setuptools>=36.2.1 in /opt/app-root/lib/python3.9/site-packages (from pipenv==2020.11.15) (50.3.2)
Requirement already satisfied: pip>=18.0 in /opt/app-root/lib/python3.9/site-packages (from pipenv==2020.11.15) (21.3.1)
Collecting certifi
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting filelock<4,>=3.2
  Downloading filelock-3.3.2-py3-none-any.whl (9.7 kB)
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.3-py2.py3-none-any.whl (496 kB)
Collecting platformdirs<3,>=2
  Downloading platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting backports.entry-points-selectable>=1.0.4
  Downloading backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl (6.2 kB)
Collecting six<2,>=1.9.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, platformdirs, filelock, distlib, backports.entry-points-selectable, virtualenv-clone, virtualenv, certifi, pipenv
Successfully installed backports.entry-points-selectable-1.1.0 certifi-2021.10.8 distlib-0.3.3 filelock-3.3.2 pipenv-2020.11.15 platformdirs-2.4.0 six-1.16.0 virtualenv-20.10.0 virtualenv-clone-0.5.7
Creating a virtualenv for this project...
Pipfile: /opt/app-root/src/Pipfile
Using /opt/app-root/bin/python3.9 (3.9.2) to create virtualenv...
⠴ Creating virtual environment...created virtual environment CPython3.9.2.final.0-64 in 1120ms
  creator CPython3Posix(dest=/opt/app-root/src/.local/share/virtualenvs/src-dqYAXZ28, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/opt/app-root/src/.local/share/virtualenv)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /opt/app-root/src/.local/share/virtualenvs/src-dqYAXZ28
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
⠴ Locking..✔ Success! 
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
⠹ Locking..✔ Success! 
Updated Pipfile.lock (10de79)!
Installing dependencies from Pipfile.lock (10de79)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Removing intermediate container 5b846c6642bc
 ---> d6cb726e595b
Step 7/18 : RUN alternatives --set python /usr/bin/python3
 ---> Running in 4456fac868b1
Removing intermediate container 4456fac868b1
 ---> 3fef3bcd05b8
Step 8/18 : ENV FLASK_APP=server/__init__.py
 ---> Running in 10df160d10fc
Removing intermediate container 10df160d10fc
 ---> 9f79e9ae5396
Step 9/18 : ENV FLASK_DEBUG=true
 ---> Running in 3e3aaf517af1
Removing intermediate container 3e3aaf517af1
 ---> d35d863d7f20
Step 10/18 : COPY . /opt/app-root/src
 ---> 21eb56382748
Step 11/18 : COPY run-dev /bin
 ---> 6f8fdb55f9e9
Step 12/18 : RUN chmod 777 /bin/run-dev
 ---> Running in 613d555ea463
Removing intermediate container 613d555ea463
 ---> fbf070a1e43d
Step 13/18 : ARG bx_dev_user=root
 ---> Running in 8b2398ecc082
Removing intermediate container 8b2398ecc082
 ---> e4f1f7fb3d27
Step 14/18 : ARG bx_dev_userid=1000
 ---> Running in 8f445f9223ea
Removing intermediate container 8f445f9223ea
 ---> 0e70978ce019
Step 15/18 : RUN BX_DEV_USER=$bx_dev_user
 ---> Running in 84a16bd7ca80
Removing intermediate container 84a16bd7ca80
 ---> 9e6c06faa1e7
Step 16/18 : RUN BX_DEV_USERID=$bx_dev_userid
 ---> Running in 8fe80c661030
Removing intermediate container 8fe80c661030
 ---> b216dad85b8f
Step 17/18 : RUN if [ "$bx_dev_user" != root ]; then useradd -ms /bin/bash -u $bx_dev_userid $bx_dev_user; fi
 ---> Running in a479b88449d6
Removing intermediate container a479b88449d6
 ---> 45cf6c601d38
Step 18/18 : CMD ["/bin/bash"]
 ---> Running in d6a87f82c3dd
Removing intermediate container d6a87f82c3dd
 ---> 84f4ae463c47
Successfully built 84f4ae463c47
Successfully tagged c1flaskapppynoauthcrlinuxmanualk81-flask-tools:latest
OK
Creating a container named 'c1flaskapppynoauthcrlinuxmanualk81-flask-tools' from that image...
OK
Starting the 'c1flaskapppynoauthcrlinuxmanualk81-flask-tools' container...
OK
Executing python manage.py build command started at Tue Nov  9 01:35:21 2021
Listing '.'...

Listing './.github'...

Listing './.github/workflows'...

Listing './chart'...

Listing './chart/c1flaskapppynoauthcrlinuxmanualk81'...

Listing './chart/c1flaskapppynoauthcrlinuxmanualk81/templates'...
Compiling './manage.py'...

Listing './public'...
Listing './scripts'...
Compiling './scripts/experience_test.py'...

Listing './server'...

Compiling './server/__init__.py'...

Listing './server/config'...

Compiling './server/config/__init__.py'...

Listing './server/routes'...

Compiling './server/routes/__init__.py'...
Compiling './server/routes/health.py'...

Compiling './server/routes/index.py'...

Compiling './server/routes/prometheus.py'...

Compiling './server/routes/swagger.py'...

Listing './server/services'...

Compiling './server/services/__init__.py'...
Compiling './server/services/service_manager.py'...

Compiling './setup.py'...

Listing './tests'...

Compiling './tests/__init__.py'...
Compiling './tests/app_tests.py'...

OK
Process time: 228.297867ms
Stopping the 'c1flaskapppynoauthcrlinuxmanualk81-flask-tools' container...
OK

@jmeis jmeis merged commit 7ac21c7 into development Nov 9, 2021
@jmeis jmeis deleted the pipenv-fix branch November 9, 2021 14:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants