From d63ca8cf2fe6bf7854afa4ac980c9e7dadda7d3b Mon Sep 17 00:00:00 2001 From: Andrey Pohilko Date: Tue, 31 Oct 2017 21:36:12 +0600 Subject: [PATCH 1/2] added info about docker image --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 19dddc6..1495ef9 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,29 @@ registry.py is a script for easy manipulation of docker-registry from command li ## Installation +### Docker image + +You can download ready-made docker image with the script and all python dependencies pre-installed: + +``` + docker pull anoxis/registry-cli +``` + +In this case, in the command line replace +``` + registry.py +``` + with +``` + docker run --rm anoxis/registry-cli +``` +in all commands below, e.g. +``` + docker run --rm anoxis/registry-cli -r http://example.com:5000 +``` + +### python script + Download registry.py and set it as executable ``` chmod 755 registry.py @@ -15,7 +38,6 @@ It uses requests python module, so you may need to install it as well: ``` pip install requests ``` - ## Listing images The below command will list all images and all tags in your registry: From d0c0acc377f831426aba353c07e97a9ea75bb752 Mon Sep 17 00:00:00 2001 From: Andrey Pohilko Date: Tue, 31 Oct 2017 21:55:47 +0600 Subject: [PATCH 2/2] added docker info --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1495ef9..e4cd468 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ You can download ready-made docker image with the script and all python dependen docker pull anoxis/registry-cli ``` -In this case, in the command line replace +In this case, in replace ``` registry.py ``` @@ -27,6 +27,12 @@ in all commands below, e.g. docker run --rm anoxis/registry-cli -r http://example.com:5000 ``` +Note: when you use the docker image and registry on the same computer (registry is on localhost), then due to internal network created by docker you have to link to the registry's network and refer registry container by its name, not localhost. +E.g. your registry container is named "registry", +then the command to launch registry-cli would be +```bash + docker run --rm --link registry anoxis/registry-cli -r http://registry:5000 +``` ### python script Download registry.py and set it as executable @@ -34,10 +40,11 @@ Download registry.py and set it as executable chmod 755 registry.py ``` -It uses requests python module, so you may need to install it as well: +Install dependencies: ``` - pip install requests + sudo pip install -r requirements.txt ``` + ## Listing images The below command will list all images and all tags in your registry: @@ -156,7 +163,7 @@ or adding relevant configuration option to the docker-registry's config.yml. For more on docker-registry configuration, read here: https://docs.docker.com/registry/configuration/ -You may get `Functionality not supported` error when this option is not enabled. +You may get `Error 405` message from script (`Functionality not supported`) when this option is not enabled. ## Contribution