mirror of
https://github.com/apple/container.git
synced 2026-09-28 01:46:25 -04:00
[container]: add clean command (#1949)
- Closes #1763 - `container clean` marks deallocated filesystem blocks in the container VM so that the host can reclaim the unused capacity.
This commit is contained in:
@@ -413,6 +413,30 @@ container export -o mycontainer.tar mycontainer
|
||||
container export mycontainer > mycontainer.tar
|
||||
```
|
||||
|
||||
### `container clean`
|
||||
|
||||
Cleans unused space on the root filesystem and each named volume mount in one or more running containers. The command only works while the container is running.
|
||||
|
||||
**Usage**
|
||||
|
||||
```bash
|
||||
container clean [--debug] <container-ids> ...
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
* `<container-ids>`: Container IDs
|
||||
|
||||
**Examples**
|
||||
|
||||
```bash
|
||||
# clean a single running container
|
||||
container clean mycontainer
|
||||
|
||||
# clean multiple running containers
|
||||
container clean mycontainer1 mycontainer2
|
||||
```
|
||||
|
||||
### `container logs`
|
||||
|
||||
Fetches logs from a container. You can follow the logs (`-f`/`--follow`), restrict the number of lines shown, or view boot logs.
|
||||
|
||||
Reference in New Issue
Block a user