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

use image prune #129

Merged
merged 1 commit into from
Nov 7, 2023
Merged

use image prune #129

merged 1 commit into from
Nov 7, 2023

Conversation

MateoLostanlen
Copy link
Member

fix #128 as recommended by @Akilditu

Copy link
Collaborator

@Akilditu Akilditu left a comment

Choose a reason for hiding this comment

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

Let's go !

@MateoLostanlen MateoLostanlen merged commit 5d40e59 into main Nov 7, 2023
7 of 8 checks passed
@MateoLostanlen MateoLostanlen deleted the fix_image_removal_issue branch November 7, 2023 13:42
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Mmmmh are you positive this is a good idea?

The force prune will delete all the images I believe, and since it happens after the pull, it also deletes the image (or try to) being used. (same goes for the other images being used like postgres & traefik)

Also, if you have two versions (let's say we do a major release). It's better to rollback and so if you have tagged images, it's all good.

The previous design was specifically making sure it deletes the previous "latest" docker image. But if you have other tagged, it kept them.

@Akilditu
Copy link
Collaborator

Akilditu commented Nov 7, 2023

Mmmmh are you positive this is a good idea?

The force prune will delete all the images I believe, and since it happens after the pull, it also deletes the image (or try to) being used. (same goes for the other images being used like postgres & traefik)

Also, if you have two versions (let's say we do a major release). It's better to rollback and so if you have tagged images, it's all good.

The previous design was specifically making sure it deletes the previous "latest" docker image. But if you have other tagged, it kept them.

This actually seems to work fine (as you can check here)

Also as mentioned in #128 the last command tried to del current image

@MateoLostanlen
Copy link
Member Author

MateoLostanlen commented Nov 7, 2023

@frgfm the force here is to avoid prompt confirmation: https://docs.docker.com/engine/reference/commandline/image_prune/ it's not to enforce it on all images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: Issue with rmi unused and dangling images
3 participants