什么是用于提取Docker镜像的Docker Hub完整注册表URL。我想得到的格式URL:[registry-url]/[namespace]/[image]:[tag]
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镜像。
[registry-url]
docker.io
[namespace]
library
[tag]
latest
[registry-url]/[namespace]/[image]
docker pull mysql
docker.io/library/mysql:latest
xjreopfe2#
2023年:我尝试在vscode dev容器中使用docker hub镜像,我不需要像公认的答案建议的那样添加/library。类似这样的东西对我很有效:
/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"
字符串请注意,有些图像名称已经包含/,您只需将包含/的整个内容视为图像名称。
/
2条答案
按热度按时间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镜像。
xjreopfe2#
2023年:
我尝试在vscode dev容器中使用docker hub镜像,我不需要像公认的答案建议的那样添加
/library
。类似这样的东西对我很有效:字符串
请注意,有些图像名称已经包含
/
,您只需将包含/
的整个内容视为图像名称。