docker镜像的docker hub注册表url是什么

nbysray5  于 11个月前  发布在  Docker
关注(0)|答案(2)|浏览(216)

什么是用于提取Docker镜像的Docker Hub完整注册表URL。
我想得到的格式URL:[registry-url]/[namespace]/[image]:[tag]

yqlxgs2m

yqlxgs2m1#

语法中的[registry-url]默认为docker.io
[namespace]默认为library
[tag]默认为latest
Docker将[registry-url]/[namespace]/[image]的组合称为 repository,偶尔会出现。
因此,如果您使用docker pull mysql,则图像名称与docker.io/library/mysql:latest相同。
(Note这不是一个“真实的”URL,在一般情况下,没有一个HTTP URL或Web页面Map到特定的Docker镜像。

xjreopfe

xjreopfe2#

2023年:
我尝试在vscode dev容器中使用docker hub镜像,我不需要像公认的答案建议的那样添加/library。类似这样的东西对我很有效:

// devcontainer.json

"image": "docker.io/ubuntu:latest"
"image": "docker.io/node:20"
"image": "docker.io/denoland/deno:latest"
"image": "docker.io/oven/bun:latest"

字符串
请注意,有些图像名称已经包含/,您只需将包含/的整个内容视为图像名称。

相关问题