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

SPCGeoNode Dockerfile build error - missing git #6728

Closed
ricardogsilva opened this issue Dec 16, 2020 · 5 comments · Fixed by #6729
Closed

SPCGeoNode Dockerfile build error - missing git #6728

ricardogsilva opened this issue Dec 16, 2020 · 5 comments · Fixed by #6729
Assignees
Labels
blocker Critical issue blocking next major release and/or (People are badly blocked with no workaround) docker Issues specific to GeoNode docker or GeoNode SPC regression Issues related to regressions.
Milestone

Comments

@ricardogsilva
Copy link
Member

Expected Behavior

It should be possible to build a new docker image for spcgeonode django image. This means running the following, as documented in geonode/scripts/spcgeonode/README.md:

docker-compose up --build -d django geoserver postgres nginx

should build docker images and stand up a slew of GeoNode-related services

Actual Behavior

It is not possible to build the django-based images because of this error:

Obtaining django_geonode_mapstore_client from git+https://github.com/GeoNode/geonode-mapstore-client.git@master#egg=django_geonode_mapstore_client (from -r requirements.txt (line 91))                       
  Cloning https://github.com/GeoNode/geonode-mapstore-client.git (to revision master) to /src/django-geonode-mapstore-client                                                                                  
  Running command git clone -q https://github.com/GeoNode/geonode-mapstore-client.git /src/django-geonode-mapstore-client                                                                                     
  ERROR: Error [Errno 2] No such file or directory: 'git': 'git' while executing command git clone -q https://github.com/GeoNode/geonode-mapstore-client.git /src/django-geonode-mapstore-client              
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?                                                                                                                              
WARNING: You are using pip version 20.1.1; however, version 20.3.3 is available.                                                                                                                              
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.                                                                                                           
ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1    

This happens because git is not installed.

The spcgeonode Dockerfile is using python:3.7-slim as a base. This image does not have git installed, so it must be added as an extra dependency in the Dockerfile.

This problem does not exist on the main geonode/Dockerfile because that one uses python:3.8.3-buster as a base, and this base image already includes git.

Steps to Reproduce the Problem

cd geonode/scripts/spcgeonode
docker-compose up --build -d django geoserver postgres nginx

Specifications

  • GeoNode version: master
  • Installation method (manual, GeoNode Docker, SPCGeoNode Docker): SPCGeoNode Docker
  • Platform: Ubuntu 20.04
  • Additional details:
@afabiani
Copy link
Member

You should use GeoNode 3.x branch not master

ricardogsilva added a commit to ricardogsilva/geonode that referenced this issue Dec 16, 2020
@ricardogsilva ricardogsilva added blocker Critical issue blocking next major release and/or (People are badly blocked with no workaround) docker Issues specific to GeoNode docker or GeoNode SPC regression Issues related to regressions. labels Dec 16, 2020
@ricardogsilva ricardogsilva added this to the 3.2 milestone Dec 16, 2020
@ricardogsilva
Copy link
Member Author

ricardogsilva commented Dec 16, 2020

@afabiani

Can you please elaborate on that? Or point me to some documentation mentioning this? Is master not the current source of development? I'm feeling a bit lost 😉

@afabiani
Copy link
Member

@ricardogsilva you should checkout the GeoNode branch 3.x (the stable one).
Master branch is unstable.

By running spcgeonode there, the mapstore dependency version should be fixed and you won't need to dump it from github.

@ricardogsilva
Copy link
Member Author

I understand that master branch may be unstable 😉 🍷

However, my purpose is doing development, which, I guess it is what master is for? Unless there is a different policy in place for doing development on the 3.x versions? If that is the case, is there some written documentation about this that I may review?

If not, is this something that you'll acknowledge as a bug? The fix is literally a one-liner, and I have a PR ready to submit too.

@afabiani
Copy link
Member

@ricardogsilva I see, sorry didn't understand you wanted to do development. It's unusual practice to use docker for development.

Your fix makes sense, nevertheless a mapstore client release will published soon and the requirements updated accordingly.

However, feel free to submit a patch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Critical issue blocking next major release and/or (People are badly blocked with no workaround) docker Issues specific to GeoNode docker or GeoNode SPC regression Issues related to regressions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants