search-dockerhub.sh
defines two shell-functions, docker-list-tags
and docker-inspect-architecture
.
docker-list-tags-usage [-j|--json] [-n|--with-name] [<NAMESPACE>/]<IMAGE>
<NAMESPACE>
: Docker Hub namespace or username (default:library
)<IMAGE>
: Docker image name (mandatory)
-j
,--json
: Output the result in JSON format-n
,--with-name
: Include the image name in the output-h
,--help
: Show this help message and exit
# List all tags for 'library/ubuntu'
docker-list-tags ubuntu
# List all tags for 'mysql/mysql-server' as JSON
docker-list-tags -j mysql/mysql-server
docker-inspect-architecture [<NAMESPACE>/]<IMAGE>[:<TAG>]
-
<NAMESPACE>
: Docker Hub namespace or username (default:library
) -
<IMAGE>
: Image name (mandatory) -
<TAG>
: Tag name (default:latest
)
# Inspect architectures of library/ubuntu:latest
docker-inspect-architecture ubuntu
# Inspect architectures of library/ubuntu:22.04
docker-inspect-architecture ubuntu:22.04
# Inspect architectures of mysql/mysql-server:latest
docker-inspect-architecture mysql/mysql-server
# Inspect architectures of mysql/mysql-server:8.0
docker-inspect-architecture mysql/mysql-server:8.0
- Bash or Zsh
- curl
- jq
See my blog entry (in Japanese) for more information.