Skip to content

Instantly share code, notes, and snippets.

@garethr
Created September 21, 2017 12:05
Show Gist options
  • Save garethr/20fe2b07fd0d7e36973a379fd8cd6bf6 to your computer and use it in GitHub Desktop.
Save garethr/20fe2b07fd0d7e36973a379fd8cd6bf6 to your computer and use it in GitHub Desktop.
Use docker-ls to query the Europa container registry

Now we have a Europa registry, interacting with the API might be of interest.

Let's grab docker-ls for this demo from https://github.com/mayflower/docker-ls. You can either download the pre-build binaries or build a local docker image like so:

git clone https://github.com/mayflower/docker-ls.git
docker build -t docker-ls .

The following assumes you have a registry running based on the Compose file above, and you have your API token handy.

$ docker run -it --net europa_default docker-ls docker-ls repositories --registry http://europa:80 --basic-auth --user TOKEN --password <token> --json
requesting list . done
{
  "Repositories": [
    "nginx"
  ]
}

See the docker-ls README for more examples of how to query the state of the registry and individual repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment