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

cleanup-docker.sh: initial commit #52

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

heitbaum
Copy link
Collaborator

Script to cleanup docker runner servers

Script to cleanup docker runner servers
@CvH
Copy link
Member

CvH commented May 23, 2023

root@runner-21:~# ./cleanup-docker.sh 
Total reclaimed space: 0B
Total reclaimed space: 0B
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
"docker image rm" requires at least 1 argument.
See 'docker image rm --help'.

Usage:  docker image rm [OPTIONS] IMAGE [IMAGE...]

Remove one or more images
root@runner-21:~# docker image ls   
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE

might be a good idea to delete the work directory too
rm -rf /home/*/actions-runner/_work

and we need a way to clean up the sources directory, that gains a lot in size :/
but thats something we should include in LE directly

@heitbaum
Copy link
Collaborator Author

heitbaum commented Jun 3, 2023

and we need a way to clean up the sources directory, that gains a lot in size :/
but thats something we should include in LE directly

was just cleaning up my local disk - whilst crude - probably meets the requirements?
find sources/ -type f -atime +30 -exec rm {} \;

@CvH
Copy link
Member

CvH commented Jun 4, 2023

was just cleaning up my local disk - whilst crude - probably meets the requirements?

for a hacky workaround this is good to go (likewise okayish fitting for the runners), for a "real" solution not really :)

ideally we would check for the needed packages at master + latest stable branch and delete everything else

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

Successfully merging this pull request may close these issues.

2 participants