Docker Desktop V3.0 has been officially released in the past two weeks. From this release, Docker officially promises that each update will be provided in an incremental way to reduce the volume of downloaded packages and improve efficiency.
In addition to updating the Docker Engine to V20.10.0, other dependencies have also been updated, as shown below:
What attracts me most is the newly added DockerHub Tool V0.2.0, which is the DockerHub CLI Tool officially provided by Docker, with the ability to manage accounts, images and other related resources on DockerHub.
Below, I will introduce the main functions of Hub Tool for you.
(MoeLove) ➜ hub-tool -h
A tool to manage your Docker Hub images
Usage:
hub-tool
hub-tool [command]
Available Commands:
account Manage your account
help Help about any command
login Login to the Hub
logout Logout of the Hub
org Manage organizations
repo Manage repositories
tag Manage tags
token Manage Personal Access Tokens
version Version information about this tool
Flags:
-h, --help help for hub-tool
--verbose Print logs
--version Display the version of this tool
Use "hub-tool [command] --help" for more information about a command.
Copy the code
From the perspective of the first-level menu, the main functions include:
- Log in/out of DockerHub;
- Account related management functions;
- Organization related management functions;
- Warehouse and tag related management functions;
- Related management functions of token;
I’m currently using the latest version, V0.2.0.
(MoeLove) ➜ hub - tool version version: v0.2.0 Git commit: 0 edf43ac9091e7cac892cbc4cbc6efbafb665aa4Copy the code
Log in/Out
To login or out, run hub-tool login or hub-tool logout.
However, it should be noted that the Hub Tool does not use the Docker Desktop default user credentials, that is, even if you have logged in to the Docker Desktop account, you still need to login to the terminal again.
As for why there is no shared user credentials, I have communicated with Docker Inc. The reason is that the current Hub Tool is still an independent CLI Tool and has not been integrated with docker CLI, and I have not yet figured out how to integrate it. When it is really integrated into the DOCker CLI, user credentials will be directly shared.
(MoeLove) ➜ hub-tool login
Username: moelove
Password:
Copy the code
Account management
Two functions of account management:
- View account information;
- Check the traffic limits under your current account, which I personally find useful;
(MoeLove) ➜ hub-tool account
Manage your account
Usage:
hub-tool account
hub-tool account [command]
Available Commands:
info Print the account information
rate-limiting Print the rate limiting information
Flags:
-h, --help help for account
Global Flags:
--verbose Print logs
Use "hub-tool account [command] --help" for more information about a command. (MoeLove) ➜ hub-tool account Rate-limiting: 200, 6 hours Window Remaining: 200, 6 hours Window (MoeLove) ➜ hub-tool account info Username: moelove.info Full name: value of your currency Zhang Company: Location: Joined: 6 years ago Plan: free Limits: Seats: 1 Private repositories: 1 Parallel builds: 1 Collaborators: unlimited Teams: unlimitedCopy the code
Organization and management
As you can see, the purpose of the Hub-tool org is to show some information about it.
(MoeLove) ➜ hub-tool org
Manage organizations
Usage:
hub-tool org
hub-tool org [command]
Available Commands:
ls List all the organizations
members List all the members in an organization
teams List all the teams in an organization
Flags:
-h, --help help for org
Global Flags:
--verbose Print logs
Use "hub-tool org [command] --help" for more information about a command(MoeLove) ➜ hub-tool org ls NAMESPACE NAME MY ROLE TEAMS MEMBERSCopy the code
Warehouse and tag management
Since both of these are directly related to mirror images, I’m going to put them together.
- Query and delete functions for the REPO:
(MoeLove) ➜ hub-tool repo -h
Manage repositories
Usage:
hub-tool repo
hub-tool repo [command]
Available Commands:
ls List all the repositories from your account or an organization
rm Delete a repository
Flags:
-h, --help help for repo
Global Flags:
--verbose Print logs
Use "hub-tool repo [command] --help" for more information about a command. (MoeLove) ➜ Hub-tool REPOSITORY DESCRIPTION LAST UPDATE effects STARS PRIVATE Taobeier/Saythx-work 2 years ago 56989 0false. (MoeLove) ➜ hub-tool repo ls -h List All the Repositories from your Account or an organization Usage: hub-tool repo ls [ORGANIZATION] Aliases: ls, list Flags: --all Fetch all available repositories --format string Print values using a custom format ("json")
-h, --help help for ls
Global Flags:
--verbose Print logs
Copy the code
- Tag list, query, view details and other functions. Here you can see the latest Push/Pull operation of tag. If Docker starts mirroring next year, I suggest you take a look.
(MoeLove) ➜ hub-tool tag
Manage tags
Usage:
hub-tool tag [flags]
hub-tool tag [command]
Available Commands:
inspect Show the details of an image in the registry
ls List all the images in a repository
rm Delete a tag in a repository
Flags:
-h, --help help for tag
Global Flags:
--verbose Print logs
Use "hub-tool tag [command] --help" for more information about a command.
See 'hub-tool tag ls --help'.
Usage: hub-tool tag ls [OPTION] REPOSITORY
List all the images inA repository (MoeLove) ➜ Hub-tool Tag ls Taobeier/Saythx-work Tag DIGEST STATUS LAST UPDATE LAST PUSHED LAST PULLED SIZE taobeier/saythx-work:latest sha256:3133a607d062dd3a8b46f38c8271099c258f5e59cecd652bebddf6e15789cb32 active 2 years ago 2 years 6 days 52.94 MB taobeier/saythx - work: 1.0 sha256:3133 a607d062dd3a8b46f38c8271099c258f5e59cecd652bebddf6e15789cb32 Active 2 years ago 2 years 6 days 52.94MBCopy the code
Token management functions
Creation/deletion, activation/invalidation, list, query details and other functions of individual tokens.
➜ Hub-tool token -h Manage Personal Access Tokens Usage: Hub-tool token [flags] Hub-tool token [command]
Available Commands:
activate Activate a Personal Access Token
create Create a Personal Access Token
deactivate Deactivate a Personal Access Token
inspect Inspect a Personal Access Token
ls List all the Personal Access Tokens
rm Delete a Personal Access Token
Flags:
-h, --help help for token
Global Flags:
--verbose Print logs
Use "hub-tool token [command] --help" for more information about a command(MoeLove) ➜ hub-tool Token ls DESCRIPTION UUID LAST USED CREATED ACTIVE test-docker-token xxxxxxxx-xxxx-xxxx-xxxx-moelove.info 9 months ago 9 monthstrue(MoeLove) ➜ hub-tool token inspect xxxxXXXX-XXXX-XXXX-xxxx-moelove. info Token: UUID: xxxxxxxx-xxxx-xxxx-xxxx-moelove.info Description: test-docker-token Is Active:trueCreated: 9 months ago Last Used: 9 months ago Creator User Agent: Mozilla/5.0 (X11; Fedora; Linux X86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.4103.116 Safari/537.36 Creator IP: 100.000.000.000.00 Generated: By user via Web UICopy the code
conclusion
The above is all about the newly released Hub Tool of Docker. It is currently shipped with Docker Desktop, so it is not available for Linux. But the plan is to open source soon. Stay tuned!
Please feel free to subscribe to my official account [MoeLove]