5

使用hub-tool管理你的dockerhub

 1 year ago
source link: https://www.bboy.app/2022/06/30/%E4%BD%BF%E7%94%A8hub-tool%E7%AE%A1%E7%90%86%E4%BD%A0%E7%9A%84dockerhub/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

使用hub-tool管理你的dockerhub

2022-06-30docker

20220630-2.webp

Docker Hub Tool是一个用于与 Docker Hub 交互的CLI工具.未来可能会集成到docker cli中

如果你经常使用dockerhub,可以考虑玩下,并且集成到你的cicd流水线中。相比于在国内登陆dockerhub,这个可能会增加你的工作效率

首先你需要一个dockerhub的账户

之后下载hub-tool

wget https://github.com/docker/hub-tool/releases/download/v0.4.4/hub-tool-linux-amd64.tar.gz

tar -zxvf hub-tool-linux-amd64.tar.gz

之后要做的第一件事情就是登陆

./hub-tool login

查看你的账户信息

./hub-tool account info

[root@localhost hub-tool]# ./hub-tool  account info
Name: bboysoul
Full name:
Company:
Location:
Joined: 4 years ago
Plan: free
Limits:
Seats: 1/1
Private repositories: 1/0
Teams: 0/0
Collaborators: 0
Parallel builds: 0

查看你的速率限制

./hub-tool account rate-limiting

[root@localhost hub-tool]# ./hub-tool account rate-limiting
Limit: 100, 6 hours window
Remaining: 100, 6 hours window

查看你的repo

./hub-tool repo ls

查看你repo里面的tag

./hub-tool tag ls bboysoul/k8s-dns-kube-dns

创建一个dockerhub token

./hub-tool token create

查看token

/hub-tool token ls

欢迎关注我的博客www.bboy.app

Have Fun


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK