Skip to content

Instantly share code, notes, and snippets.

@tripu
Created March 22, 2019 08:17
Show Gist options
  • Save tripu/fb124e37436f88acb248657b30d77730 to your computer and use it in GitHub Desktop.
Save tripu/fb124e37436f88acb248657b30d77730 to your computer and use it in GitHub Desktop.
List or filter all tags for a given Docker image
#!/bin/sh
# All tags of Docker image "circleci/node" (raw JSON):
curl https://registry.hub.docker.com/v1/repositories/circleci/node/tags
# All images and their tags from CircleCI's own Docker registry (raw JSON):
curl https://circleci.com/docs/2.0/docker-image-tags.json
# All tags of Docker image "circleci/node", formatting JSON output:
curl https://registry.hub.docker.com/v1/repositories/circleci/node/tags | jq .
# All tags of Docker image "circleci/node", formatting JSON output, and filtering by names containing "lts":
curl https://registry.hub.docker.com/v1/repositories/circleci/node/tags | jq '.[] | select(.name | contains("lts"))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment