-
-
Notifications
You must be signed in to change notification settings - Fork 18
Update worker
Dockerfile
image to bookworm
#460
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
base: main
Are you sure you want to change the base?
Conversation
The issue here was that `slim-buster` has reached LTS and so trying to run `apt-get` commands on the image was returning 404 errors. The real robust solution is to upgrade to a newer future- proof image like `bookworm` instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/pytest_celery/vendors/worker/Dockerfile (1)
7-21
: Shrink image size & avoid dangling layers.
apt-get update && apt-get install -y …
leaves APT caches in the layer and pulls in recommended packages by default, inflating the image >200 MB.-RUN apt-get update && apt-get install -y build-essential \ +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends build-essential \ git \ @@ - sudo + sudo \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*Benefits: ~80 MB smaller image, fewer CVE surfaces.
No functional change.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pytest_celery/vendors/worker/Dockerfile
(1 hunks)
🔇 Additional comments (1)
src/pytest_celery/vendors/worker/Dockerfile (1)
1-1
: All dependencies exist in Debian Bookworm
Verified against packages.debian.org/bookworm—build-essential, git, wget, make, curl, apt-utils, debconf, lsb-release, libmemcached-dev, libffi-dev, ca-certificates, pypy3, pypy3-lib, and sudo all return HTTP 200. No renames or backports needed; you can safely bump topython:3.10-slim-bookworm
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
=======================================
Coverage 23.80% 23.80%
=======================================
Files 41 41
Lines 1294 1294
Branches 94 94
=======================================
Hits 308 308
Misses 959 959
Partials 27 27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about updating to python 3.12 as well?
@@ -1,4 +1,4 @@ | |||
FROM python:3.10-slim-buster | |||
FROM python:3.10-slim-bookworm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM python:3.10-slim-bookworm | |
FROM python:3.12-slim-bookworm |
I'll try updating to |
Upgrade the image used for the
pytest_celery_worker
from thepython:3.10-slim-buster
to thepython:3.10-slim-bookworm
image, because thebuster
images are on Debian 10, and it has already left the LTS, so therefore its package mirrors were moved from deb.debian.org to archive.debian.org.Once that happened, apt-get update inside the image began getting 404 / Release-file-missing errors, and the next apt-get install bailed out with exit code 100.
To reproduce on the
main
branch run:You will see an output like this:
Then on my branch, you will see the same command run without error.
Summary by CodeRabbit