Klappson/zope-compose

Unable to build

Closed this issue · 3 comments

Hi.
Not sure if it is because I am working on Debian (docker should not have a problem with that), but when I execute StartZopeCompose, I get

 => ERROR [ 4/10] RUN pip3 install zope     zope.mkzeoinstance     psycopg2-binary     Products.PythonScripts     Products.ZSQLMethods     Products.SiteErrorLog     Products.StandardCacheManagers     Products.ExternalMethod     Products.MailHost     git+https://github.com/pe  7.5s
------                                                                                                                                                                                                                                                                                    
 > [ 4/10] RUN pip3 install zope     zope.mkzeoinstance     psycopg2-binary     Products.PythonScripts     Products.ZSQLMethods     Products.SiteErrorLog     Products.StandardCacheManagers     Products.ExternalMethod     Products.MailHost     git+https://github.com/perfact/ZPsycopgDA     git+https://github.com/perfact/zodbsync     git+https://loc.kplays.de:8080/Python/dockerutils.git     Paste:                                                                                                                                                                       
6.055 error: externally-managed-environment                                                                                                                                                                                                                                               
6.055                                                                                                                                                                                                                                                                                     
6.055 × This environment is externally managed
6.055 ╰─> To install Python packages system-wide, try apt install
6.055     python3-xyz, where xyz is the package you are trying to
6.055     install.
6.055     
6.055     If you wish to install a non-Debian-packaged Python package,
6.055     create a virtual environment using python3 -m venv path/to/venv.
6.055     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
6.055     sure you have python3-full installed.
6.055     
6.055     If you wish to install a non-Debian packaged Python application,
6.055     it may be easiest to use pipx install xyz, which will manage a
6.055     virtual environment for you. Make sure you have pipx installed.
6.055     
6.055     See /usr/share/doc/python3.11/README.venv for more information.
6.055 
6.055 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
6.055 hint: See PEP 668 for the detailed specification.
------
Dockerfile:11
--------------------
  10 |     
  11 | >>> RUN pip3 install zope \
  12 | >>>     zope.mkzeoinstance \
  13 | >>>     psycopg2-binary \
  14 | >>>     Products.PythonScripts \
  15 | >>>     Products.ZSQLMethods \
  16 | >>>     Products.SiteErrorLog \
  17 | >>>     Products.StandardCacheManagers \
  18 | >>>     Products.ExternalMethod \
  19 | >>>     Products.MailHost \
  20 | >>>     git+https://github.com/perfact/ZPsycopgDA \
  21 | >>>     git+https://github.com/perfact/zodbsync \
  22 | >>>     git+https://loc.kplays.de:8080/Python/dockerutils.git \
  23 | >>>     Paste
  24 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install zope     zope.mkzeoinstance     psycopg2-binary     Products.PythonScripts     Products.ZSQLMethods     Products.SiteErrorLog     Products.StandardCacheManagers     Products.ExternalMethod     Products.MailHost     git+https://github.com/perfact/ZPsycopgDA     git+https://github.com/perfact/zodbsync     git+https://loc.kplays.de:8080/Python/dockerutils.git     Paste" did not complete successfully: exit code: 1
ERROR: Service 'zeo' failed to build : Build failed

I tried to replace git+https://github.com/perfact/zodbsync by perfact-zodbsync (the package is published on pypi), but it seems that was not the cause of the error.

It seems adding --break-system-packages to both pip calls does the trick. I'll create a PR later.

Hmm interesting. Will double check via interfaces-docker project. Switched its dockerfile to perfact-zodbsync a while ago ( without backporting it to this repo 😨😄 ), had no issues firing up new installations. Probably something new, will compare to dockerfiles used there: dockerfile changes

Double checked. True thing. pip doesn't know it's running in a throwaway container and is scared to harm system python packages. Adding the switch u mentioned helps.