A CLI tool to access Docker Hub from your terminal.
You should have pip installed in your system.
pip install docker-hub
python 3 users can do
pip3 install docker-hub
If you are already loggedin using docker login
command, then the token in docker engine config will be used. Otherwise you will be prompted to enter username and password.
To query repositories in an organization use repos
argument. The organization to query can be passed as --orgname
or -o
parameter.
eg: Get repos in organization named "docker"
docker-hub repos --orgname docker
To query tags of a repository use tags
argument. The organization of repository can be passed as --orgname
or -o
parameter. The repository to query can be passed as --reponame
or -r
parameter.
eg: Get tags of repository "ucp" in organization named "docker"
docker-hub tags --orgname docker --reponame ucp
To query a user profile use users
argument. The username to query can be passed as --username
or -u
parameter.
eg: Get profile of user named "docker"
docker-hub users --username docker
To query auto-builds of a repository use builds
argument. The organization of repository can be passed as --orgname
or -o
parameter. The repository to query can be passed as --reponame
or -r
parameter.
eg: Get build of repository "ucp" in organization named "docker"
docker-hub builds --orgname docker --reponame ucp
To query the auto-build repositories with pending builds use the queue
argument. The organization to query can be passed as --orgname
or -o
parameter.
eg: Get the building queue for organization named "docker"
docker-hub queue --orgname docker
-
Only 15 results will be displayed at once. You can fetch remaining pages by passing
--page
or-p
parameter.eg: Get 3rd page
docker-hub repos --orgname docker --page 3
-
The results can be displayed in 2 formats:
- json - Displays result as JSON string.
- table - Displays results as nicely formatted table.
--format
or-f
parameter can be used to specify the format in which result must be displayed.eg:
- Display in json format
docker-hub repos --orgname docker --format json
- Display in table format
docker-hub repos --orgname docker --format table
Questions, problems or suggestions? Please post them on the issue tracker.
You can contribute changes by forking the project and submitting a pull request. Feel free to contribute 😍
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.