Open
Description
Package version (if known): latest, 3.3
Describe the bug
The script ./docker/build-images.sh fails. The Dockerfile.base does not copy the project and the setup.py
file, needed by the pipenv
command.
Steps to Reproduce
- cookiecutter a new instance
- run
./docker/build-images.sh
- See error
Expected behavior
It should build the images :)
Stacktrace
./docker/build-images.sh
Sending build context to Docker daemon 1.354MB
Step 1/3 : FROM inveniosoftware/centos7-python:3.6
---> d207351414dd
Step 2/3 : COPY Pipfile Pipfile.lock ./
---> Using cache
---> 40067563a31a
Step 3/3 : RUN pipenv install --deploy --system
---> Running in fa547f7baab1
Installing dependencies from Pipfile.lock (a2ed81)…
Ignoring appnope: markers 'sys_platform == "darwin"' don't match your environment
An error occurred while installing -e .! Will try again.
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]: File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: []
[pipenv.exceptions.InstallError]: ['ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /opt/invenio/src']
ERROR: ERROR: Package installation failed...
The command '/bin/bash -c pipenv install --deploy --system' returned a non-zero code: 1
Sending build context to Docker daemon 1.355MB
Step 1/6 : ARG DEPENDENCIES_VERSION=latest
Step 2/6 : FROM fare-base:${DEPENDENCIES_VERSION}
pull access denied for fare-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Fix
Add:
FROM inveniosoftware/centos7-python:3.6
+ COPY ./ .
COPY Pipfile Pipfile.lock ./
RUN pipenv install --deploy --system
Reported by @CorsoGabriele and @EugenioCorso