Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-images.sh fails #244

Open
ntarocco opened this issue Sep 3, 2020 · 0 comments
Open

docker-images.sh fails #244

ntarocco opened this issue Sep 3, 2020 · 0 comments
Labels

Comments

@ntarocco
Copy link
Contributor

ntarocco commented Sep 3, 2020

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

  1. cookiecutter a new instance
  2. run ./docker/build-images.sh
  3. 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

@ntarocco ntarocco added the bug label Sep 3, 2020
ntarocco added a commit to ntarocco/cookiecutter-invenio-instance that referenced this issue Sep 3, 2020
- adds he entire project files in the Dockerfile.base, needed by the cmd
  pipenv install which is installing the local Python package in
  editable mode
- closes inveniosoftware#244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant