mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-02 04:32:23 +00:00
Add note about docker image cleanup (#1597)
Closes #1532 Adds notes about images not being cleaned up by wood-pecker and provides examples on how you can automate the cleanup. Also provides a warning that these are destructive actions. <img width="1020" alt="CleanShot 2023-03-03 at 09 36 35@2x" src="https://user-images.githubusercontent.com/64056131/222800658-f610d488-f8ea-4aca-8ed0-f26e44be1884.png"> --------- Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
parent
d35ab57f80
commit
72784bc11a
1 changed files with 22 additions and 0 deletions
|
@ -35,3 +35,25 @@ RUN apk add -U --no-cache docker-credential-ecr-login
|
|||
## Podman support
|
||||
|
||||
While the agent was developed with Docker/Moby, Podman can also be used by setting the environment variable `DOCKER_SOCK` to point to the Podman socket. In order to work without workarounds, Podman 4.0 (or above) is required.
|
||||
|
||||
## Image Cleanup
|
||||
|
||||
The agent **will not** automatically remove images from the host. This task should be managed by the host system. For example, you can use a cron job to periodically do clean-up tasks for the CI runner.
|
||||
|
||||
:::danger
|
||||
|
||||
The following commands **are destructive** and **irreversible** it is highly recommended that you test these commands on your system before running them in production via a cron job or other automation.
|
||||
|
||||
:::
|
||||
|
||||
### Remove all unused images
|
||||
|
||||
```sh
|
||||
docker image rm $(docker images --filter "dangling=true" -q --no-trunc)
|
||||
```
|
||||
|
||||
### Remove Woodpecker Volumes
|
||||
|
||||
```sh
|
||||
docker volume rm $(docker volume ls --filter name=^wp_* --filter dangling=true -q)
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue