ML Skills
Docker
Registry
Last updated on Jun 15, 2021

infant-room

Today in this post, we will talk about the place from where we usually pull the docker images - Docker Registry.

Docker Registry is an application that runs on Docker's server. It stores docker images so you can download them or push your own docker images to your own repository just like GitHub.

Searching

To search for a docker image, you can type:

docker search ubuntu

cli-search

Alternatively, you can go to hub.docker.com (opens in a new tab). This web version will provide more information about how to use the image, its description, the latest update and all of its tags.

hub-search

Publish an image to the world

# You need to login first
docker login
 
# Give ubuntu image a new name with tag
docker tag ubuntu:14.04 tungdao17/my-ubuntu:v1.0
 
# push it to docker hub
docker push tungdao17/my-ubuntu:v1.0

Start your own docker registry

It's very simple to start your own registry. Refer to Docker registry (opens in a new tab) for more details.

Keynotes

  • Some commands
# Search for a published image
docker search image_name
 
# Give an image a new name with tag
docker tag image_id your_docker_registry/image_name:tag
 
# push image to docker hub
docker push your_docker_registry/image_name:tag
  • Don't trust every docker images.
  • Clean your local images frequently.