Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joemiller/dugar
Get the total size of images in a Google Artifact Registry docker repository.
https://github.com/joemiller/dugar
Last synced: 13 days ago
JSON representation
Get the total size of images in a Google Artifact Registry docker repository.
- Host: GitHub
- URL: https://github.com/joemiller/dugar
- Owner: joemiller
- License: mit
- Created: 2023-12-19T01:29:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-22T19:12:34.000Z (7 months ago)
- Last Synced: 2024-04-22T20:32:37.317Z (7 months ago)
- Language: Go
- Size: 59.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dugar
> it's *`du(1)` for Google Artifact Registry (GAR)*
Get the total size of images in a Google Artifact Registry docker repository.
## Install
`go install github.com/joemiller/dugar@latest`
## Usage
Requires Application Default Credentials. If running localy with `gcloud` you can run `gcloud auth application-default login` to setup local ADC.
example:
```console
$ dugar -project my-project -location us -repo my-repoAnalyzing projects/my-project/locations/us/repositories/my-repo ...
6.30 GiB us-docker.pkg.dev/my-project/my-repo/db-runtime
48.81 GiB us-docker.pkg.dev/my-project/my-repo/web-app
0.03 GiB us-docker.pkg.dev/my-project/my-repo/another-app
0.09 GiB us-docker.pkg.dev/my-project/my-repo/worker-foo
55.23 GiB .
```Pipe through `sort(1)` to sort by size:
```console
$ dugar -project my-project -location us -repo my-repo | sort -h
Analyzing projects/my-project/locations/us/repositories/my-repo ...
48.81 GiB us-docker.pkg.dev/my-project/my-repo/web-app
6.30 GiB us-docker.pkg.dev/my-project/my-repo/db-runtime
0.09 GiB us-docker.pkg.dev/my-project/my-repo/worker-foo
0.03 GiB us-docker.pkg.dev/my-project/my-repo/another-app
55.23 GiB .The `-format` flag can be used to change the output format. The default is `GiB`.
Use `-h` for help.
Images and tags can be explicitly included or excluded with `--include-image`, `--exclude-image`, `--include-tag`, and `--exclude-tag` flags. The arguments must be valid RE2 regexes.