-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix clean apk cache directory #3656
Conversation
alpine uses /var/cache/apk, not apt
|
Welcome @fougner! |
/easycla |
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.
looks good to me, but I have minor question: isn't the apk cache clean
doing the same?
/lgtm |
/ok-to-test |
Index is still left, so it probably just removes the package caches. $ docker run -it alpine:3.18 sh
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
v3.18.2-316-g7d500b620dd [https://dl-cdn.alpinelinux.org/alpine/v3.18/main]
v3.18.2-315-ga3c91f8b49b [https://dl-cdn.alpinelinux.org/alpine/v3.18/community]
OK: 20065 distinct packages available
/ # apk cache clean
/ # ls /var/cache/apk/
APKINDEX.49104001.tar.gz APKINDEX.884188d8.tar.gz |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fougner, mloiseleur, piotrkpc, Raffo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
alpine uses /var/cache/apk, not apt
Description
Haven't opened an issue, the problem is obvious and fix is trivial. Correctly cleaning up APKINDEX saves ~1.8M from the built alpine image.
Alternative solution, which is less verbose, would be to just use
apk add --no-cache "libcrypto3>=3.0.8-r4" "libssl3>=3.0.8-r4"
Checklist