tn.stackoverflow
tn.stackoverflow

Reputation: 427

What is the docker hub registry url for an docker image

What is the docker hub full registry url for pulling docker images.

I would like to get url in the format: [registry-url]/[namespace]/[image]:[tag]

Upvotes: 20

Views: 27855

Answers (2)

ZYinMD
ZYinMD

Reputation: 5159

2023:

I'm trying to use docker hub image in vscode dev containers, and I didn't need to add /library as the accepted answer suggested. Something like this worked for me:

// devcontainer.json

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

Note that some image names already contain a /, you just treat the whole thing including / as the image name.

Upvotes: 1

David Maze
David Maze

Reputation: 159875

[registry-url] in your syntax defaults to docker.io.

[namespace] defaults to library.

[tag] defaults to latest.

Docker calls the combination of [registry-url]/[namespace]/[image] a repository, which comes up occasionally.

So, if you docker pull mysql, that image name is identical to docker.io/library/mysql:latest.

(Note that this isn't a "real" URL, and in the general case there's no single HTTP URL or Web page that maps to a specific Docker image.)

Upvotes: 29

Related Questions