repo2docker icon indicating copy to clipboard operation
repo2docker copied to clipboard

Bump alpine version used in Dockerfile

Open yuvipanda opened this issue 1 year ago • 2 comments

Brings us to latest alpine, and to a newer python

yuvipanda avatar Feb 03 '24 17:02 yuvipanda

What are the benefits of using a virtualenv inside the image?

manics avatar Feb 04 '24 17:02 manics

@manics it is mandatory now, it errors out if you don't use one (https://peps.python.org/pep-0668/).

You can see the full config in https://github.com/jupyterhub/repo2docker/actions/runs/7768480733/job/21186449405

 #15 [stage-1 3/9] RUN pip3 install hg-evolve --user --no-cache-dir
#15 1.427 error: externally-managed-environment
#15 1.427 
#15 1.427 × This environment is externally managed
#15 1.427 ╰─> 
#15 1.427     The system-wide python installation should be maintained using the system
#15 1.427     package manager (apk) only.
#15 1.427     
#15 1.427     If the package in question is not packaged already (and hence installable via
#15 1.427     "apk add py3-somepackage"), please consider installing it inside a virtual
#15 1.427     environment, e.g.:
#15 1.427     
#15 1.427     python3 -m venv /path/to/venv
#15 1.427     . /path/to/venv/bin/activate
#15 1.427     pip install mypackage
#15 1.427     
#15 1.427     To exit the virtual environment, run:
#15 1.427     
#15 1.427     deactivate
#15 1.427     
#15 1.427     The virtual environment is not deleted, and can be re-entered by re-sourcing
#15 1.427     the activate file.
#15 1.427     
#15 1.427     To automatically manage virtual environments, consider using pipx (from the
#15 1.427     pipx package).
#15 1.427 
#15 1.427 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.
#15 1.427 hint: See PEP 668 for the detailed specification.
#15 ERROR: process "/bin/sh -c pip3 install hg-evolve --user --no-cache-dir" did not complete successfully: exit code: 1

yuvipanda avatar Feb 04 '24 18:02 yuvipanda

Merging this resolves repo2docker-action https://github.com/jupyterhub/repo2docker-action/issues/113.

I pushed commits to:

  • tweak comment unrelated to PR
  • use modern ENV syntax with = signs between key/values
  • use ARG instead of ENV when not needed to provide an env var only during docker build as compared to also during docker run

consideRatio avatar Mar 24 '24 21:03 consideRatio

I marked this as breaking to highlight it as a possible breaking change for users of the image

consideRatio avatar Mar 24 '24 21:03 consideRatio