Home Explore Blog CI



docker

1st chunk of `content/get-started/workshop/04_sharing_app.md`
8354510eecc5587f86aae9ac7c748ebbdcaddd9a56deac9e000000010000083a
---
title: Share the application
weight: 40
linkTitle: "Part 3: Share the application"
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
  docker desktop, docker hub, sharing
description: Sharing your image you built for your example application so you can
  run it else where and other developers can use it
aliases:
 - /get-started/part3/
 - /get-started/04_sharing_app/
 - /guides/workshop/04_sharing_app/
---

Now that you've built an image, you can share it. To share Docker images, you have to use a Docker
registry. The default registry is Docker Hub and is where all of the images you've used have come from.

> **Docker ID**
>
> A Docker ID lets you access Docker Hub, which is the world's largest library and community for container images. Create a [Docker ID](https://hub.docker.com/signup) for free if you don't have one.

## Create a repository

To push an image, you first need to create a repository on Docker Hub.

1. [Sign up](https://www.docker.com/pricing?utm_source=docker&utm_medium=webreferral&utm_campaign=docs_driven_upgrade) or Sign in to [Docker Hub](https://hub.docker.com).

2. Select the **Create Repository** button.

3. For the repository name, use `getting-started`. Make sure the **Visibility** is **Public**.

4. Select **Create**.

In the following image, you can see an example Docker command from Docker Hub. This command will push to this repository.




## Push the image

Let's try to push the image to Docker Hub.

1. In the command line, run the following commmand:

   ```console
   docker push docker/getting-started
   ```

   You'll see an error like this:

   ```console
   $ docker push docker/getting-started
   The push refers to repository [docker.io/docker/getting-started]
   An image does not exist locally with the tag: docker/getting-started
   ```

   This failure is expected because the image isn't tagged correctly yet.
   Docker is looking for an image name `docker/getting started`, but your
   local image is still named `getting-started`.

Title: Share the Application by Pushing the Image to Docker Hub
Summary
This section describes how to share the Docker image you built by pushing it to a Docker registry, specifically Docker Hub. It guides you through creating a repository on Docker Hub and attempts to push the image. It also expects the push to fail initially due to incorrect image tagging.