RMI-PACTA / docker

Docker images
https://2degreesinvesting.github.io/docker/
MIT License
1 stars 0 forks source link

Fail fast with existing images 2dii_pacta #6

Closed maurolepore closed 3 years ago

maurolepore commented 3 years ago

best to test if any images exist before trying to delete them

# "docker rmi" requires at least 1 argument.
# See 'docker rmi --help'.
# 
# Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...]
# 
# Remove one or more images
maurolepore commented 3 years ago

@cjyetman,

I think it's safest to not remove images at all and instead force the user to do that separately. To me, removing images from the user's system seems like a dangerous side effect that it's unexpected from a command called build_with_tag.

Do you see it differently?

cjyetman commented 3 years ago

no, I agree... I'd rather it not do that, but...

I added this because if I didn't remove the old ones first, I ended up with a zombie instance running on my machine, which wasn't straightforward to get rid of

so, maybe something in between, like check if there are conflicting images and exit with a message that they need to be removed first?