pyronear / pyro-platform

Detection & monitoring platform of wildfires
https://platform.pyronear.org/
Apache License 2.0
10 stars 10 forks source link

use image prune #129

Closed MateoLostanlen closed 9 months ago

MateoLostanlen commented 9 months ago

fix #128 as recommended by @Akilditu

Akilditu commented 9 months ago

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 commented 9 months ago

@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.