Pushing Images to Docker Hub

Image names and tags

Every image on Docker Hub is assigned a unique name:

[your_user_name]/[image_name]:[tag_name]

Tags are different variations of an image. You first saw these when running the MySQL container. The official MySQL image offers various editions of 5.6, 5.7, and 8.0.

A default tag of latest is applied to any new image. That version is downloaded when no tag is specified while pulling an image.

A single image can have any number of tags applied. The onus is on you, the image developer, to tag images appropriately and ensure the most recent stable release is tagged with the latest.

Create a Docker Hub repository

The first step is to create a repository at Docker Hub. Log in at https://hub.docker.com/ and click “Repositories” then “Create Repository” (or open https://hub.docker.com/repository/create):

Get hands-on with 1200+ tech skills courses.