Supported Feature
- clean image in azure acr by the follow config
config file name: config.toml
sample config file: config.sample.toml
[azure]
# azure tenant id
tenant_id = "xxxxxxxxxxxxxxx"
[acr]
# access app privilege: delete
# acr access app's id
image_manager_id = "xxxxxxxxxxx"
# acr access app's password
image_manager_pwd = "xxxxxxxxx"
# acr private name like "james.azurecr.io"
endpoint = "xxxxxx.azurecr.io"
# @type: array
# image name filter
# keyword: keep the image_name which contains the keyword
[[filter.image_name.keep.rules]]
keyword = "/"
[[filter.image_name.keep.rules]]
keyword = "-"
# tag filter
# 1. tag won't be deleted which contains the filter keyword
# 2. the rest tags order by create time desc
# 3. keep top 'default.num' of the tags processed in step 2, finally the rest tags will be deleted
[filter.tag.keep]
default.num = 20
# @type: array
# tag name filter
# keyword: keep the tag which contains this keyword
[[filter.tag.keep.rules]]
keyword = "stable"
[[filter.tag.keep.rules]]
keyword = "latest"
- build binary file
cargo build -p acr --release
-
prepare config file(
config.toml
) -
run the executable binary file
./acr