A click based tool for working with remote docker registries
Project description
This project provides a click based CLI interface against the version 2 docker registry API. I wrote this because Google yielded nothing, and I run a private registry for personal projects that needs maintenance that is extremely cumbersome with curl / bash scripts.
Installation
We’re now available in pypi! Install simply with:
$ pip install drclip
Usage
The tool makes use of the fantastic Click library with a sub command structure:
$ drclip --help
Usage: drclip [OPTIONS] COMMAND [ARGS]...
Runs commands against docker registries
Options:
-c, --config FILENAME
-r, --registry TEXT The registry to query [required]
--help Show this message and exit.
Commands:
digests Get the digest(s) for given tag(s)
manifest List the manifests for a given repository and a given tag
repos Lists the repositories in a registry via the _catalog API
rmd Removes a manifest(s) for given digest(s)
tags Lists the tags for a given repository using the /tags/list API
Tab completion
After installation you can enable tab completion with bash via:
$ eval "$(_DRCLIP_COMPLETE=source drclip)"
Right now only the -r
/ --registry
option supports tab completion.
Environs
There are a couple of environmental variables you can define to avoid tedious argument entry:
DRCLIP_REG
- defaults the-r
/--registry
argument on commandsDRCLIP_REPO
- defaults the-o
/--repository
argument on commands
Authentication
Credentials for the registries are retrieved (by default) by using the ~/.docker/config.json
. Currently only
the built in credential store system provided by docker is supported for retrieving credentials.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file drclip-2.0.3.tar.gz
.
File metadata
- Download URL: drclip-2.0.3.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd226415e9df67c9fab8e4dfccc9d13e777748cd1706abf975fe50aca85b54ce |
|
MD5 | 16f814b71fd3ac4df599867f8a7099c1 |
|
BLAKE2b-256 | 4797bf69e50f50f815d2d7a6fa7d045e0f7f11a92c2a8ddd2a3cb3c82c7536be |