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

mega-linter-runner should use --remove-container by default #3062

Closed
vorburger opened this issue Nov 1, 2023 · 2 comments · Fixed by #3203
Closed

mega-linter-runner should use --remove-container by default #3062

vorburger opened this issue Nov 1, 2023 · 2 comments · Fixed by #3203
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity

Comments

@vorburger
Copy link

vorburger commented Nov 1, 2023

I cannot think of a good reason why you wouldn't have mega-linter-runner use --remove-container (introduced in #1563 and fixed in #1917) on by default, and only use the flag to explicit if one intentionally needs KEEP it, e.g. to debug a problem for developers of megalinter, which is a comparatively rare use case?

As an end-users of megalinter who runs it from a CLI, the fact that it uses a container behind the scenes should be transparent to me, and not "DOS" 😈 my sometimes very limited disk space 🥲 eg. inside a GitHub Codespace... this is IMHO pretty bad:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          32G   29G  816M  98% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        29G   22G  7.3G  75% /usr/sbin/docker-init
/dev/sdb1        44G  1.9M   42G   1% /tmp
/dev/loop3       32G   29G  816M  98% /workspaces

$ docker ps -a
CONTAINER ID   IMAGE                                  COMMAND                  CREATED             STATUS                         PORTS     NAMES
ed10aef2c161   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   3 minutes ago       Exited (0) 32 seconds ago                objective_goldberg
9be27f02137f   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   5 minutes ago       Exited (1) 3 minutes ago                 elegant_goldberg
f28f97d535a9   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   16 minutes ago      Exited (1) 13 minutes ago                nice_pascal
1a76f7cb867d   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   49 minutes ago      Exited (1) 47 minutes ago                confident_kepler
5d2b73cce1ae   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   About an hour ago   Exited (1) About an hour ago             stoic_chatelet
00f2a79842f8   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   2 hours ago         Exited (1) 2 hours ago                   thirsty_visvesvaraya
a49862e6472f   oxsecurity/megalinter-cupcake:v7.5.0   "/bin/bash /entrypoi…"   2 hours ago         Exited (1) 2 hours ago                   fervent_burnell

$ docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y

Deleted Containers:
ed10aef2c161a5d20845364761e5c7f3b442d5232e96f8df8a5bfd1f65581724
9be27f02137f704e3bfddaf57ad0143d871aa68a9595014597244930b783f927
f28f97d535a94f0027be5e2fe99b53efb7aadddbdcca7c49c939b3c4d16de415
1a76f7cb867d3c0e1ed3ba0a2d351d029f6229f22d9d1025498cafdce38b8e8a
5d2b73cce1aef36cafe1a539d88eeb8a3d71ce359a60bbc24ea7de94314ce90c
00f2a79842f8253d8efc1c93039c0b7bb2c7c28802be36e003caaf1334b8f2ea
a49862e6472fbd46172367dd3e1b100429a2b40a89b10417c7598e55460c518d

Total reclaimed space: 11.64GB

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          32G   18G   12G  61% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/root        29G   22G  7.3G  75% /usr/sbin/docker-init
/dev/sdb1        44G  2.0M   42G   1% /tmp
/dev/loop3       32G   18G   12G  61% /workspaces

I can (and have) work around it by adding --remove-container to a custom launch script - but shouldn't have to?

@vorburger vorburger added the bug Something isn't working label Nov 1, 2023
@Kurt-von-Laven
Copy link
Collaborator

I agree with your feedback. Thank you for bringing this up.

Copy link
Contributor

github-actions bot commented Dec 2, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 2, 2023
nvuillam added a commit that referenced this issue Dec 10, 2023
nvuillam added a commit that referenced this issue Dec 10, 2023
…-container` option is sent (#3203)

Fixes #3062

Co-authored-by: nvuillam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity
Projects
None yet
2 participants