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

Stop/Remove all running containers before removing images #13

Closed
a13xp0p0v opened this issue Oct 4, 2023 · 2 comments
Closed

Stop/Remove all running containers before removing images #13

a13xp0p0v opened this issue Oct 4, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@a13xp0p0v
Copy link
Owner

Thanks to @joseigor for the PoC: #11

@a13xp0p0v a13xp0p0v added the enhancement New feature or request label Oct 4, 2023
@a13xp0p0v
Copy link
Owner Author

Looked at the design.

Decided to create a python script manage_containers.py, that will substitute build_containers.sh and rm_containers.sh.

It will support choosing specific containers for removing.

a13xp0p0v added a commit that referenced this issue Jan 2, 2025
Refers to #12, #13, #27, #28.

Thanks to @Willenst for the collaboration.
@a13xp0p0v
Copy link
Owner Author

Implemented in #27.

Quoting README:

Remove all created images:

$ python3 manage_images.py -r

Expected output, if some containers are running:

Remove the container image providing Clang 17 and GCC 14
Error response from daemon: conflict: unable to delete 18f5a5c70571 (cannot be forced) - image is being used by running container e322f234ee1b
[!] WARNING: Image removal failed, see the error message above

[!] WARNING: failed to remove 1 container image(s), see the log above

Current status:
-----------------------------------------
 Ubuntu | Clang  | GCC    | Image ID
-----------------------------------------
 16.04  | 5      | 4.9    | -
 16.04  | 6      | 5      | -
 18.04  | 7      | 6      | -
 18.04  | 8      | 7      | -
 20.04  | 9      | 8      | -
 20.04  | 10     | 9      | -
 20.04  | 11     | 10     | -
 22.04  | 12     | 11     | -
 22.04  | 13     | 12     | -
 22.04  | 14     | 12     | -
 24.04  | 15     | 13     | -
 24.04  | 16     | 14     | -
 24.04  | 17     | 14     | 18f5a5c70571
-----------------------------------------

In that case simply stop this container and run manage_images.py -r again.

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

No branches or pull requests

1 participant