update documentations
This commit is contained in:
parent
e0ae99915e
commit
56a75edf69
38
README.md
38
README.md
|
@ -1,10 +1,10 @@
|
||||||
# clear-docker-images
|
# clear-docker-images
|
||||||
|
|
||||||
`clear-docker-images` is a small rust binary made to cleanup old docker images but date, repository and tags.
|
`clear-docker-images` is a small rust binary made to cleanup old docker images by date, repository and tags.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
By default (it will change in the futur), `clear-docker-images` will select images that are older than 2 days old by default. You can choose to customize its behavior by filtering by repository, tags and from a specific date.
|
By default, `clear-docker-images` will select images that are older than 2 days old. You can choose to customize its behavior by filtering a different date by passing 1 or 2 dates, a repository and tags.
|
||||||
|
|
||||||
### Docker container
|
### Docker container
|
||||||
|
|
||||||
|
@ -37,12 +37,30 @@ clear-docker-images <OPTIONS>
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
-d, --date <DATE> filter by repository name (ISO 8601) [default: $NOW - 2 days]
|
-d, --date <DATE>
|
||||||
--dry-run image cleanup will not be triggered
|
filter by date.
|
||||||
--force should docker force image removal (it may create orphan images)
|
|
||||||
-h, --help Print help information
|
Can filter by a minimum age $DATE or from $FROM|$TO (format example: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)
|
||||||
-r, --repository <REPOSITORY> filter by repository name
|
[default: $NOW - 2 days]
|
||||||
-t, --tags <TAGS> add tags exclusion Example: -t 1.1.0 -t release
|
|
||||||
-v, --verbose add more logs
|
--dry-run
|
||||||
-V, --version Print version information
|
image cleanup will not be triggered [default: false]
|
||||||
|
|
||||||
|
--force
|
||||||
|
force image removal [default: false]
|
||||||
|
|
||||||
|
-h, --help
|
||||||
|
Print help information
|
||||||
|
|
||||||
|
-r, --repository <REPOSITORY>
|
||||||
|
filter by repository name
|
||||||
|
|
||||||
|
-t, --tags <TAGS>
|
||||||
|
add tags exclusion
|
||||||
|
|
||||||
|
-v, --verbose
|
||||||
|
add more logs [default: false]
|
||||||
|
|
||||||
|
-V, --version
|
||||||
|
Print version information
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ const DOCKER_BIN: &str = "docker";
|
||||||
struct Args {
|
struct Args {
|
||||||
/// filter by date.
|
/// filter by date.
|
||||||
///
|
///
|
||||||
/// Can filter by a minimum age $DATE or from $FROM|$TO (%Y-%m-%dT%H:%M:%S%Z) [default: $NOW - 2 days]
|
/// Can filter by a minimum age $DATE or from $FROM|$TO (format example: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS) [default: $NOW - 2 days]
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
date: Option<String>,
|
date: Option<String>,
|
||||||
|
|
||||||
|
|
Reference in New Issue