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

Update all docker-images to Debian Bookworm (latest stable) #2723

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Nov 9, 2023

Closes #2695

@hmpf hmpf requested a review from lunkwill42 November 9, 2023 13:43
Copy link

github-actions bot commented Nov 9, 2023

Test results

     12 files       12 suites   11m 17s ⏱️
3 320 tests 3 320 ✔️ 0 💤 0
9 435 runs  9 435 ✔️ 0 💤 0

Results for commit 8101a8b.

♻️ This comment has been updated with latest results.

Copy link

sonarcloud bot commented Nov 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me, but I doubt we need the extra virtualenv complication if we switch from "pure" Debian to the "python:*-bookworm" images.

Comment on lines 5 to 9
psycopg2 # requires libpq to build
IPy==1.01
pyaml

twisted>=20.0.0,<21
twisted>=20.0.0
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure you have a good reason for changing these requirements, but I would prefer it if that reason was stated more clearly in the commit log, for posterity. Since these affect more than just the dev images, a separate commit would be best, methinks..

Copy link
Member

Choose a reason for hiding this comment

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

These have now been been pushed as separate prs #2795 and #2796

Comment on lines +74 to +81
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
Copy link
Member

Choose a reason for hiding this comment

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

Actually, I don't think you need any of this virtualenv f**kery when working from the python images at Dockerhub. They don't use the Debian-provided python/pip, so PEP 668 doesn't seem to apply here.

In fact, I can't get NAV to start properly in this bookworm-based image unless I delete these three lines.

I'd be glad to see this go, as I don't see the point of mixing virtualenvs into containers (unless you, for some silly reason, actually need multiples of them within a single container)

Copy link

sonarcloud bot commented Jan 3, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@lunkwill42
Copy link
Member

This will likely be stuck in limbo until #2788 is complete.

@hmpf hmpf force-pushed the bookworm branch 2 times, most recently from 0a8b47b to 83f87b8 Compare February 27, 2024 06:33
@hmpf hmpf force-pushed the bookworm branch 2 times, most recently from 23c6cc3 to 407a23f Compare March 1, 2024 08:39
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.69%. Comparing base (9cfd877) to head (8101a8b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2723   +/-   ##
=======================================
  Coverage   56.69%   56.69%           
=======================================
  Files         602      602           
  Lines       43971    43971           
=======================================
  Hits        24931    24931           
  Misses      19040    19040           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hmpf hmpf force-pushed the bookworm branch 4 times, most recently from f9f47cb to 5222e0d Compare March 7, 2024 09:02
Copy link

sonarcloud bot commented Mar 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

hmpf added 3 commits March 7, 2024 13:39
Bookworm does not allow distro pip to install anything in the system
tree (/usr). See PEP 668 and
https://pythonspeed.com/articles/externally-managed-environment-pep-668/

More importantly: install python stuff into a virtualenv, mirroring how
it is done in production. See
https://pythonspeed.com/articles/activate-virtualenv-dockerfile/

The howto above doesn't use sudo. We do, so note the extra fun in the
shell scripts. (Sudo does not by default preserve the caller's path.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Base the Dockerfile on debian bookworm
2 participants