Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

docker image prune -a #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

docker image prune -a #45

wants to merge 3 commits into from

Conversation

FDiskas
Copy link
Contributor

@FDiskas FDiskas commented Apr 18, 2021

I would like to reclaim more space. In my case it was like 4GB after couple month of daily deploys
More info apocas/dockerode#429

docker system df

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              18                  6                   5.501GB             4.639GB (84%)
Containers          6                   6                   64.72MB             0B (0%)
Local Volumes       3                   3                   50.92MB             0B (0%)
Build Cache         0                   0                   0B                  0B

And after pruning with flag -a

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              6                   6                   1.587GB             0B (0%)
Containers          6                   6                   64.72MB             0B (0%)
Local Volumes       3                   3                   50.92MB             0B (0%)
Build Cache         0                   0                   0B                  0B

FDiskas added 3 commits April 18, 2021 23:36
I would like to reclaim more space. In my case it was like 8GB after couple month of daily deploys
More info apocas/dockerode#429
Code style
@coveralls
Copy link

Coverage Status

Coverage remained the same at 87.462% when pulling 6f85cac on FDiskas:patch-1 into 5725c91 on exoframejs:master.

@yamalight
Copy link
Contributor

This changes the behavior quite a bit. It should be behind a flag IMO 🤔

@FDiskas
Copy link
Contributor Author

FDiskas commented Apr 23, 2021

This is what I'm thinking:
exoframe is not going to mimic/forward docker commands with all his additional params.
the same as exoframe rm container - impossible to remove multiple containers at once - just because it's not going to replace docker functionality - but rather then a helper to do some common stuff without actually connecting to the server. Lets allow exoframe do its job (cleanup as much as possible) - on dedicated server size is matter. But in other cases like if end user is very delicate - he can cleanup connected to the server and using docker with all params or without params as he wants.

@yamalight
Copy link
Contributor

yamalight commented Apr 23, 2021

I'm not saying exoframe should mimic all docker commands, I'm just saying this particular one should be behind an opt-in flag.
Removing all dangling images has quite a severe impact (on docker builds, starting services, etc) - so IMO it shouldn't be default, it needs a flag.

@FDiskas
Copy link
Contributor Author

FDiskas commented Apr 23, 2021

This flag should look the same -a?

@yamalight
Copy link
Contributor

@FDiskas yeah, --all (short -a) would be perfect

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

Successfully merging this pull request may close these issues.

3 participants