GeoNode / geonode-project

A django template project for creating custom GeoNode projects.
http://geonode.org
78 stars 172 forks source link

Geoserver Dockerfile, build failed #342

Closed hascar closed 2 years ago

hascar commented 2 years ago

Branch 3.3.x (also master) The Dockerfile of Geoserver use the docker image tomcat:9-jre8 that some day ago passed from Ubuntu Focal to Ubuntu Jammy. https://github.com/GeoNode/geonode-project/blob/master/docker/geoserver/Dockerfile

Inside the dockerfile there is this installation of pip: https://github.com/GeoNode/geonode-project/blob/124c9ecdba915a36541fccbf46bf20951e603f9b/docker/geoserver/Dockerfile#L95 that broke the build with this error:

Traceback (most recent call last): File "/usr/bin/pip3", line 5, in from pip._internal.cli.main import main File "/usr/local/lib/python3.10/dist-packages/pip/init.py", line 21, in from pip._vendor.urllib3.exceptions import DependencyWarning File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/init.py", line 8, in from .connectionpool import ( File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/connectionpool.py", line 29, in from .connection import ( File "/usr/local/lib/python3.10/dist-packages/pip/vendor/urllib3/connection.py", line 39, in from .util.ssl import ( File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/util/init.py", line 3, in from .connection import is_connection_dropped File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/util/connection.py", line 3, in from .wait import wait_for_read File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/util/wait.py", line 1, in from .selectors import ( File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/urllib3/util/selectors.py", line 14, in from collections import namedtuple, Mapping ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py) The command '/bin/sh -c apt-get update && apt-get install -y procps less && apt-get install -y python3 python3-pip python3-dev && chmod +x /usr/local/tomcat/tmp/set_geoserver_auth.sh && chmod +x /usr/local/tomcat/tmp/setup_auth.sh && chmod +x /usr/local/tomcat/tmp/entrypoint.sh && pip3 install pip==9.0.3 && pip3 install -r requirements.txt && chmod +x /usr/local/tomcat/tmp/get_dockerhost_ip.py && chmod +x /usr/local/tomcat/tmp/get_nginxhost_ip.py' returned a non-zero code: 1 Service 'geoserver' failed to build : Build failed

Could be the version of Python that changed from 3.8 to 3.10

vidlb commented 2 years ago

Yep, same here, I can confirm the build is successful after removing && pip3 install pip==9.0.3