exoframe-server icon indicating copy to clipboard operation
exoframe-server copied to clipboard

docker image prune -a

Open FDiskas opened this issue 4 years ago • 6 comments

I would like to reclaim more space. In my case it was like 4GB after couple month of daily deploys More info https://github.com/apocas/dockerode/issues/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 avatar Apr 18 '21 20:04 FDiskas

Coverage Status

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

coveralls avatar Apr 18 '21 20:04 coveralls

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

yamalight avatar Apr 20 '21 10:04 yamalight

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.

FDiskas avatar Apr 23 '21 08:04 FDiskas

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.

yamalight avatar Apr 23 '21 08:04 yamalight

This flag should look the same -a?

FDiskas avatar Apr 23 '21 12:04 FDiskas

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

yamalight avatar Apr 26 '21 09:04 yamalight