Docker image Error — The Docker image build failed


The Docker image build failed systematically when I tried to start a new interactive environment (see screenshot). Ignoring this requires pip installation of all requirements.

Project: shin.koseki/cdh_map

1 Like

Hi Shin,
could you click the ‘view pipeline in GitLab’ button and tell us what error you see there?

Hi Andreas, thanks:

 ERROR: Command errored out with exit status 1:
   command: /opt/conda/bin/python /opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/ get_requires_for_build_wheel /tmp/tmpjtpotx7n
       cwd: /tmp/pip-install-jjh7y_3e/cartopy
  Complete output (3 lines): UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
    '.'.join(str(v) for v in GEOS_MIN_VERSION), ))
  Proj 4.9.0 must be installed.
ERROR: Command errored out with exit status 1: /opt/conda/bin/python /opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/ get_requires_for_build_wheel /tmp/tmpjtpotx7n Check the logs for full command output.
The command '/bin/sh -c conda env update -q -f /tmp/environment.yml &&     /opt/conda/bin/pip install -r /tmp/requirements.txt &&     conda clean -y --all &&     conda env export -n "root"' returned a non-zero code: 1
ERROR: Job failed: exit code 1

Hi @sjinko,

Thanks for the snapshots!

Some packages require some extra system dependencies that you can add in the Dockerfile of your project. I tried with your specific error of cartopy, which seems to need to apt-get install the ones from here:


There’s a commented out section in the Dockerfile that shows where to add them, but you can also look at my example here:
these lines:

USER root
RUN apt-get update && \
   apt-get install -y --no-install-recommends \
   libproj-dev proj-data proj-bin  \

Since the docker image build failed, you can make the edits to the Dockerfile in the GitLab editing interface.

To make sure the requirements will build when you start a new environment, you can try pip install -r requirements.txt. Otherwise using the GitLab editor for updating the Dockerfile is a good way to test changes if your docker image isn’t building.



Hi Emmjab,
Thanks for this. It seems to work!