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

Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11 #1332

Merged
merged 6 commits into from
Mar 24, 2024

Conversation

yuvipanda
Copy link
Collaborator

Brings us to latest alpine, and to a newer python

@manics
Copy link
Member

manics commented Feb 4, 2024

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

@yuvipanda
Copy link
Collaborator Author

@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

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
The use of `ENV key value` is an old alternative syntax still around for backward compatibility, but may be removed according to https://docs.docker.com/reference/dockerfile/#env.
@consideRatio consideRatio changed the title Bump alpine version used in Dockerfile Bump alpine version used in Dockerfile, updates Python 3.10 to 3.11 Mar 24, 2024
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@consideRatio
Copy link
Member

Merging this resolves repo2docker-action jupyterhub/repo2docker-action#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

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If tests pass, this LGTM.

@consideRatio consideRatio changed the title Bump alpine version used in Dockerfile, updates Python 3.10 to 3.11 Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11 Mar 24, 2024
@consideRatio consideRatio added maintenance Under the hood fixes and improvements breaking labels Mar 24, 2024
@consideRatio
Copy link
Member

consideRatio commented Mar 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking maintenance Under the hood fixes and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants