2.4 KiB
title | keywords | description | aliases | |
---|---|---|---|---|
Publish your image | get started, quick start, intro, concepts | Learn how to publish your image to Docker Hub |
|
Follow this walkthrough to learn how to publish and share your images on Docker Hub.
{{< include "guides-get-docker.md" >}}
Step 1: Get the example image
To get the example image:
- In Docker Desktop, select the search bar.
- In the search bar, specify
docker/welcome-to-docker
. - Select Pull to pull the image from Docker Hub to you computer.
Step 2: Sign in to Docker
Select Sign in on the top-right of Docker Desktop to either sign in or create a new Docker account.
Step 3: Rename your image
Before you can publish your image, you need to rename it so that Docker Hub knows that the image is yours. In a terminal, run the following command to rename your image. Replace YOUR-USERNAME
with your Docker ID.
{{< include "open-terminal.md" >}}
$ docker tag docker/welcome-to-docker YOUR-USERNAME/welcome-to-docker
Step 4: Push your image to Docker Hub
To push your image to Docker Hub:
- In Docker Desktop, go to the Images tab
- In the Actions column for your image, select the Show image actions icon.
- Select Push to Hub.
Go to Docker Hub and verify that the list of your repositories now contains YOUR-USERNAME/welcome-to-docker
.
Summary
In this walkthrough, you pushed and shared an image on Docker Hub.
Related information:
- Deep dive into the Docker Hub manual
- Learn more about the docker tag command
Next steps
Continue to the language-specific guides to learn how you can use Docker to containerize and develop applications in your favorite language. Choose one of the following guides.