cli: add config and images command

Extends the existing zot CLI to add commands for listing all images and
their details on a zot server.
Listing all images introduces the need for configurations.

Each configuration has a name and URL at the least. Check 'zot config
-h' for more details.

The user can specify the URL of zot server explicitly while running the
command or configure a URL and pass it directly.

Adding a configuration:
zot config add aci-zot <zot-url>

Run 'zot config --help' for more.

Listing all images:
zot images --url <zot-url>

Pass a config instead of the url:
zot images <config-name>

Filter the list of images by image name:
zot images <config-name> --name <image-name>

Run 'zot images --help' for all details

- Stores configurations in '$HOME/.zot' file

Add CLI README
This commit is contained in:
Tanmay Naik
2020-06-16 21:52:40 -04:00
parent 4a1519bb1d
commit ad684ac44b
17 changed files with 2169 additions and 84 deletions
+4
View File
@@ -4,7 +4,9 @@ go 1.14
require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/briandowns/spinner v1.11.1
github.com/chartmuseum/auth v0.4.0
github.com/dustin/go-humanize v1.0.0
github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a
github.com/go-chi/chi v4.0.2+incompatible // indirect
github.com/go-ldap/ldap/v3 v3.1.3
@@ -15,6 +17,7 @@ require (
github.com/mitchellh/mapstructure v1.1.2
github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484 // indirect
github.com/nmcclain/ldap v0.0.0-20191021200707-3b3b69a7e9e3
github.com/olekukonko/tablewriter v0.0.4
github.com/opencontainers/distribution-spec v1.0.0-rc0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.1
@@ -29,4 +32,5 @@ require (
go.etcd.io/bbolt v1.3.4
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9
gopkg.in/resty.v1 v1.12.0
gopkg.in/yaml.v2 v2.2.4
)