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

Docker Library - manifest cleanup #565

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

grooverdan
Copy link
Member

jq --arg x v implies x is always a string. This
doesn't work when its compared to a number as as such all images are cleared.

Make removal around Dangling match the comment.

Ensure that buildah images removed have a mariadb name (otherwise it picks up ubuntu/mysql images in repo).

Simplify other select expressions to include more.

Yes, buildah and podman put different capitalization on .Id/.id files in json format

Template selection

Please go the the Preview tab and select the appropriate sub-template:

@fauust
Copy link
Collaborator

fauust commented Sep 16, 2024

LGTM, not mandatory but following is cleaner:

podman images --format=json |
  jq --arg lastweek "$lastweek" '.[] | select(.Created <= ( $lastweek | tonumber ) and .Dangling? ) | .Id' |
  xargs --no-run-if-empty podman rmi --force ||
  echo "continuing cleanup anyway

jq --arg x v implies x is always a string. This
doesn't work when its compared to a number as as such
all images are cleared.

Make removal around Dangling match the comment.

Ensure that buildah images removed have a mariadb name
(otherwise it picks up ubuntu/mysql images in repo).

Simplify other select expressions to include more.

Yes, buildah and podman put different capitalization on
.Id/.id files in json format
@grooverdan grooverdan merged commit 5043ec9 into MariaDB:main Sep 16, 2024
1 check failed
@grooverdan grooverdan deleted the mariadb_cleanup branch September 16, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants