From 1f5a5782a7e922efcd649eceea5ff7b79952bcfd Mon Sep 17 00:00:00 2001 From: Jerae Duffin Date: Tue, 13 Dec 2022 17:41:56 -0600 Subject: [PATCH 1/4] created overview for Hub --- _data/toc.yaml | 2 + docker-hub/index.md | 22 ---------- docker-hub/overview.md | 93 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 22 deletions(-) create mode 100644 docker-hub/overview.md diff --git a/_data/toc.yaml b/_data/toc.yaml index 80c723107a..586c48df7a 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1710,6 +1710,8 @@ manuals: - sectiontitle: Docker Hub section: + - path: /docker-hub/overview/ + title: Overview - path: /docker-hub/ title: Quickstart - path: /docker-id/ diff --git a/docker-hub/index.md b/docker-hub/index.md index 057dd2a59d..745ff9e271 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -3,7 +3,6 @@ description: Docker Hub Quickstart keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, accounts, organizations, repositories, groups, teams title: Docker Hub Quickstart redirect_from: -- /docker-hub/overview/ - /apidocs/docker-cloud/ - /docker-cloud/ - /docker-cloud/migration/ @@ -77,27 +76,6 @@ redirect_from: - /apidocs/overview/ --- -[Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"} is a service provided by Docker for -finding and sharing container images with your team. It is the world’s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. - -Users get access to free public repositories for storing and sharing images or can choose a [subscription plan](https://www.docker.com/pricing){: target="_blank" rel="noopener" class="_"} for private repositories. - -Docker Hub provides the following major features: - -* [Repositories](../docker-hub/repos/index.md): Push and pull container images. -* [Teams & Organizations](orgs.md): Manage access to private -repositories of container images. -* [Docker Official Images](official_images.md): Pull and use high-quality -container images provided by Docker. -* [Docker Verified Publisher Images](publish/index.md): Pull and use high- -quality container images provided by external vendors. -* [Builds](builds/index.md): Automatically build container images from -GitHub and Bitbucket and push them to Docker Hub. -* [Webhooks](webhooks.md): Trigger actions after a successful push - to a repository to integrate Docker Hub with other services. - -Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank" rel="noopener" class="_"} tool (currently experimental) and an API that allows you to interact with Docker Hub. Browse through the [Docker Hub API](/docker-hub/api/latest/){: target="_blank" rel="noopener" class="_"} documentation to explore the supported endpoints. - The following section contains step-by-step instructions on how to easily get started with Docker Hub. ### Step 1: Sign up for a Docker account diff --git a/docker-hub/overview.md b/docker-hub/overview.md new file mode 100644 index 0000000000..3fa25f0412 --- /dev/null +++ b/docker-hub/overview.md @@ -0,0 +1,93 @@ +--- +description: Docker Hub overview +keywords: Docker, docker, docker hub, hub, overview +title: Overview +--- + +[Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"} is a service provided by Docker for +finding and sharing container images with your team. It's the world’s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. + +Users get access to free public repositories for storing and sharing images or can choose a [subscription plan](https://www.docker.com/pricing){: target="_blank" rel="noopener" class="_"} for private repositories. + +Docker Hub provides the following major features: + +* [Repositories](../docker-hub/repos/index.md): Push and pull container images. +* [Teams & Organizations](orgs.md): Manage access to private +repositories of container images. +* [Docker Official Images](official_images.md): Pull and use high-quality +container images provided by Docker. +* [Docker Verified Publisher Images](publish/index.md): Pull and use high- +quality container images provided by external vendors. +* [Builds](builds/index.md): Automatically build container images from +GitHub and Bitbucket and push them to Docker Hub. +* [Webhooks](webhooks.md): Trigger actions after a successful push + to a repository to integrate Docker Hub with other services. + +Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank" rel="noopener" class="_"} tool (currently experimental) and an API that allows you to interact with Docker Hub. Browse through the [Docker Hub API](/docker-hub/api/latest/){: target="_blank" rel="noopener" class="_"} documentation to explore the supported endpoints. + +
+ +
+
+
+
+ Docker ID +
+

Create a Docker ID

+

Sign up and create a new Docker ID

+
+
+
+
+
+ Docker Compose +
+

Create a repository

+

Create a repository to share your images with your team, customers, or Docker community.

+
+
+
+
+
+ quickstart +
+

Quickstart

+

Step-by-step instructions on getting started Docker Hub.

+
+
+ +
+
+
+
+ + secure + +
+

Manage access tokens

+

Create personal access tokens as an alternative to your password.

+
+
+
+
+
+ Stacked windows +
+

Official images

+

A curated set of Docker repositories hosted on Docker Hub.

+
+
+
+
+
+ Release notes +
+

Release notes

+

Find out about new features, improvements, and bug fixes.

+
+
+
+
+ + + From 1c1a0ef1f5fad901b34b27eb4356354da9106447 Mon Sep 17 00:00:00 2001 From: Jerae Duffin Date: Thu, 15 Dec 2022 15:30:03 -0600 Subject: [PATCH 2/4] updated image --- docker-hub/overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-hub/overview.md b/docker-hub/overview.md index 3fa25f0412..63c5994ceb 100644 --- a/docker-hub/overview.md +++ b/docker-hub/overview.md @@ -49,9 +49,9 @@ Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){:
- quickstart + quickstart
-

Quickstart

+

Quickstart

Step-by-step instructions on getting started Docker Hub.

From 21105dd888590c42ac6a9f7a9bfbd0921dadd6b3 Mon Sep 17 00:00:00 2001 From: Jerae Duffin Date: Mon, 19 Dec 2022 09:15:26 -0600 Subject: [PATCH 3/4] updated toc --- _data/toc.yaml | 4 +- compose/envvars-precedence.md | 2 +- develop/index.md | 2 +- docker-hub/index.md | 265 +++++++++++----------------------- docker-hub/overview.md | 93 ------------ docker-hub/quickstart.md | 194 +++++++++++++++++++++++++ 6 files changed, 280 insertions(+), 280 deletions(-) delete mode 100644 docker-hub/overview.md create mode 100644 docker-hub/quickstart.md diff --git a/_data/toc.yaml b/_data/toc.yaml index 586c48df7a..6fc71c08b6 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1710,9 +1710,9 @@ manuals: - sectiontitle: Docker Hub section: - - path: /docker-hub/overview/ - title: Overview - path: /docker-hub/ + title: Overview + - path: /docker-hub/quickstart/ title: Quickstart - path: /docker-id/ title: Docker ID accounts diff --git a/compose/envvars-precedence.md b/compose/envvars-precedence.md index 97449ecc72..453d247760 100644 --- a/compose/envvars-precedence.md +++ b/compose/envvars-precedence.md @@ -12,7 +12,7 @@ The order of precedence is as follows: 1. Passed from the command line [`docker compose run --env `](../../engine/reference/commandline/compose_run/#options). 2. Passed from/set in `compose.yaml` service's configuration, from the [environment key](../../compose/compose-file/#environment). 3. Passed from/set in `compose.yaml` service's configuration, from the [env_file key](../../compose/compose-file/#env_file). -4. Passed from/set in Container Image in the [ENV directive](../../engine/reference/builder/#env). +4. Passed from/set in Container Image in the [ENV directive](../engine/reference/builder.md#env). ### Example scenario diff --git a/develop/index.md b/develop/index.md index 34bc7818a7..aa9b33f4d6 100644 --- a/develop/index.md +++ b/develop/index.md @@ -16,7 +16,7 @@ If you're just getting started developing a brand new app on Docker, check out these resources to understand some of the most common patterns for getting the most benefits from Docker. -- Learn how to [build an image](../engine/reference/builder/){: target="_blank" rel="noopener" class="_"} using a Dockerfile +- Learn how to [build an image](../engine/reference/builder.md){: target="_blank" rel="noopener" class="_"} using a Dockerfile - Use [multi-stage builds](../build/building/multi-stage.md) to keep your images lean - Manage application data using [volumes](../storage/volumes.md) and [bind mounts](../storage/bind-mounts.md){: target="_blank" rel="noopener" class="_"} - [Scale your app with Kubernetes](../get-started/kube-deploy.md){: target="_blank" rel="noopener" class="_"} diff --git a/docker-hub/index.md b/docker-hub/index.md index 745ff9e271..51f963252f 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -1,194 +1,93 @@ --- -description: Docker Hub Quickstart -keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, accounts, organizations, repositories, groups, teams -title: Docker Hub Quickstart -redirect_from: -- /apidocs/docker-cloud/ -- /docker-cloud/ -- /docker-cloud/migration/ -- /docker-cloud/migration/cloud-to-swarm/ -- /docker-cloud/migration/cloud-to-kube-aks/ -- /docker-cloud/migration/cloud-to-kube-gke/ -- /docker-cloud/migration/cloud-to-aws-ecs/ -- /docker-cloud/migration/deregister-swarms/ -- /docker-cloud/migration/kube-primer/ -- /docker-cloud/cloud-swarm/ -- /docker-cloud/cloud-swarm/using-swarm-mode/ -- /docker-cloud/cloud-swarm/register-swarms/ -- /docker-cloud/cloud-swarm/register-swarms/ -- /docker-cloud/cloud-swarm/create-cloud-swarm-aws/ -- /docker-cloud/cloud-swarm/create-cloud-swarm-azure/ -- /docker-cloud/cloud-swarm/connect-to-swarm/ -- /docker-cloud/cloud-swarm/link-aws-swarm/ -- /docker-cloud/cloud-swarm/link-azure-swarm/ -- /docker-cloud/cloud-swarm/ssh-key-setup/ -- /docker-cloud/infrastructure/ -- /docker-cloud/infrastructure/deployment-strategies/ -- /docker-cloud/infrastructure/link-aws/ -- /docker-cloud/infrastructure/link-do/ -- /docker-cloud/infrastructure/link-azure/ -- /docker-cloud/infrastructure/link-packet/ -- /docker-cloud/infrastructure/link-softlayer/ -- /docker-cloud/infrastructure/ssh-into-a-node/ -- /docker-cloud/infrastructure/docker-upgrade/ -- /docker-cloud/infrastructure/byoh/ -- /docker-cloud/infrastructure/cloud-on-packet.net-faq/ -- /docker-cloud/infrastructure/cloud-on-aws-faq/ -- /docker-cloud/standard/ -- /docker-cloud/getting-started/ -- /docker-cloud/getting-started/intro_cloud/ -- /docker-cloud/getting-started/connect-infra/ -- /docker-cloud/getting-started/your_first_node/ -- /docker-cloud/getting-started/your_first_service/ -- /docker-cloud/getting-started/deploy-app/1_introduction/ -- /docker-cloud/getting-started/deploy-app/2_set_up/ -- /docker-cloud/getting-started/deploy-app/3_prepare_the_app/ -- /docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/ -- /docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/ -- /docker-cloud/getting-started/deploy-app/6_define_environment_variables/ -- /docker-cloud/getting-started/deploy-app/7_scale_the_service/ -- /docker-cloud/getting-started/deploy-app/8_view_logs/ -- /docker-cloud/getting-started/deploy-app/9_load-balance_the_service/ -- /docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/ -- /docker-cloud/getting-started/deploy-app/11_service_stacks/ -- /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/ -- /docker-cloud/apps/ -- /docker-cloud/apps/deploy-to-cloud-btn/ -- /docker-cloud/apps/auto-destroy/ -- /docker-cloud/apps/autorestart/ -- /docker-cloud/apps/auto-redeploy/ -- /docker-cloud/apps/load-balance-hello-world/ -- /docker-cloud/apps/deploy-tags/ -- /docker-cloud/apps/stacks/ -- /docker-cloud/apps/ports/ -- /docker-cloud/apps/service-redeploy/ -- /docker-cloud/apps/service-scaling/ -- /docker-cloud/apps/api-roles/ -- /docker-cloud/apps/service-links/ -- /docker-cloud/apps/triggers/ -- /docker-cloud/apps/volumes/ -- /docker-cloud/apps/stack-yaml-reference/ -- /docker-cloud/installing-cli/ -- /docker-cloud/docker-errors-faq/ -- /docker-cloud/release-notes/ -- /docker-store/ -- /apidocs/ -- /apidocs/overview/ +description: Docker Hub overview +keywords: Docker, docker, docker hub, hub, overview +title: Overview --- -The following section contains step-by-step instructions on how to easily get started with Docker Hub. +[Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"} is a service provided by Docker for +finding and sharing container images with your team. It's the world’s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. -### Step 1: Sign up for a Docker account +Users get access to free public repositories for storing and sharing images or can choose a [subscription plan](https://www.docker.com/pricing){: target="_blank" rel="noopener" class="_"} for private repositories. -Let's start by creating a [Docker ID](https://hub.docker.com/signup){: target="_blank" rel="noopener" class="_"}. +Docker Hub provides the following major features: -A Docker ID grants you access to Docker Hub repositories and allows you to explore images that are available from the community and verified publishers. You'll also need a Docker ID to share images on Docker Hub. +* [Repositories](../docker-hub/repos/index.md): Push and pull container images. +* [Teams & Organizations](orgs.md): Manage access to private +repositories of container images. +* [Docker Official Images](official_images.md): Pull and use high-quality +container images provided by Docker. +* [Docker Verified Publisher Images](publish/index.md): Pull and use high- +quality container images provided by external vendors. +* [Builds](builds/index.md): Automatically build container images from +GitHub and Bitbucket and push them to Docker Hub. +* [Webhooks](webhooks.md): Trigger actions after a successful push + to a repository to integrate Docker Hub with other services. -### Step 2: Create your first repository +Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank" rel="noopener" class="_"} tool (currently experimental) and an API that allows you to interact with Docker Hub. Browse through the [Docker Hub API](/docker-hub/api/latest/){: target="_blank" rel="noopener" class="_"} documentation to explore the supported endpoints. -To create a repository: +
+ +
+
+
+
+ Docker ID +
+

Create a Docker ID

+

Sign up and create a new Docker ID

+
+
+
+
+
+ Docker Compose +
+

Create a repository

+

Create a repository to share your images with your team, customers, or Docker community.

+
+
+
+
+
+ quickstart +
+

Quickstart

+

Step-by-step instructions on getting started Docker Hub.

+
+
+ +
+
+
+
+ + secure + +
+

Manage access tokens

+

Create personal access tokens as an alternative to your password.

+
+
+
+
+
+ Stacked windows +
+

Official images

+

A curated set of Docker repositories hosted on Docker Hub.

+
+
+
+
+
+ Release notes +
+

Release notes

+

Find out about new features, improvements, and bug fixes.

+
+
+
+
-1. Sign in to [Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"}. -2. Click **Create a Repository** on the Docker Hub welcome page. -3. Name it **<your-username>/my-private-repo**. -4. Set the visibility to **Private**. - ![Create Repository](images/index-create-repo.png) -5. Click **Create**. - - You've created your first repository. You should see: - - ![Repository Created](images/index-repo-created.png) - -### Step 3: Download and install Docker Desktop - -You'll need to download Docker Desktop to build, push, and pull container images. - -1. Download and install [Docker Desktop](../desktop/index.md). - -2. Sign in to the Docker Desktop application using the Docker ID you've just created. - -### Step 4: Pull and run a container image from Docker Hub - -1. Run `docker pull hello-world` to pull the image from Docker Hub. You should see output similar to: - - ```console - $ docker pull hello-world - Using default tag: latest - latest: Pulling from library/hello-world - 2db29710123e: Pull complete - Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 - Status: Downloaded newer image for hello-world:latest - docker.io/library/hello-world:latest - ``` - -2. Run `docker run hello-world` to run the image locally. You should see output similar to: - - ```console - $ docker run hello-world - Hello from Docker! - This message shows that your installation appears to be working correctly. - - To generate this message, Docker took the following steps: - 1. The Docker client contacted the Docker daemon. - 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. - (amd64) - 3. The Docker daemon created a new container from that image which runs the - executable that produces the output you are currently reading. - 4. The Docker daemon streamed that output to the Docker client, which sent - it to your terminal. - - To try something more ambitious, you can run an Ubuntu container with: - $ docker run -it ubuntu bash - - Share images, automate workflows, and more with a free Docker ID: - https://hub.docker.com/ - - For more examples and ideas, visit: - https://docs.docker.com/get-started/ - ``` - -### Step 5: Build and push a container image to Docker Hub from your computer - -1. Start by creating a [Dockerfile](../engine/reference/builder/) to specify your application as shown below: - - ```dockerfile - # syntax=docker/dockerfile:1 - FROM busybox - CMD echo "Hello world! This is my first Docker image." - ``` - -2. Run `docker build -t /my-private-repo .` to build your Docker - image. - -3. Run `docker run /my-private-repo` to test your -Docker image locally. - -4. Run `docker push /my-private-repo` to push your Docker image to Docker Hub. You should see output similar to: - - ![Terminal](images/index-terminal.png) - - >**Note** - > - > You must be signed in to Docker Hub through Docker Desktop or the command line, and you must also name your images correctly, as per the above steps. - -5. Your repository in Docker Hub should now display a new `latest` tag under **Tags**: - - ![Tag Created](images/index-tag.png) - -Congratulations! You've successfully: - -- Signed up for a Docker account -- Created your first repository -- Pulled an existing container image from Docker Hub -- Built your own container image on your computer -- Pushed it successfully to Docker Hub - -### Next steps - -- Create an [organization](orgs.md) to use Docker Hub with your team. -- Automatically build container images from code through [builds](builds/index.md). -- [Explore](https://hub.docker.com/explore) official & publisher images. -- [Upgrade your subscription](https://www.docker.com/pricing) to push additional private Docker images to -Docker Hub. diff --git a/docker-hub/overview.md b/docker-hub/overview.md deleted file mode 100644 index 63c5994ceb..0000000000 --- a/docker-hub/overview.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -description: Docker Hub overview -keywords: Docker, docker, docker hub, hub, overview -title: Overview ---- - -[Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"} is a service provided by Docker for -finding and sharing container images with your team. It's the world’s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. - -Users get access to free public repositories for storing and sharing images or can choose a [subscription plan](https://www.docker.com/pricing){: target="_blank" rel="noopener" class="_"} for private repositories. - -Docker Hub provides the following major features: - -* [Repositories](../docker-hub/repos/index.md): Push and pull container images. -* [Teams & Organizations](orgs.md): Manage access to private -repositories of container images. -* [Docker Official Images](official_images.md): Pull and use high-quality -container images provided by Docker. -* [Docker Verified Publisher Images](publish/index.md): Pull and use high- -quality container images provided by external vendors. -* [Builds](builds/index.md): Automatically build container images from -GitHub and Bitbucket and push them to Docker Hub. -* [Webhooks](webhooks.md): Trigger actions after a successful push - to a repository to integrate Docker Hub with other services. - -Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank" rel="noopener" class="_"} tool (currently experimental) and an API that allows you to interact with Docker Hub. Browse through the [Docker Hub API](/docker-hub/api/latest/){: target="_blank" rel="noopener" class="_"} documentation to explore the supported endpoints. - -
- -
-
-
-
- Docker ID -
-

Create a Docker ID

-

Sign up and create a new Docker ID

-
-
-
-
-
- Docker Compose -
-

Create a repository

-

Create a repository to share your images with your team, customers, or Docker community.

-
-
-
-
-
- quickstart -
-

Quickstart

-

Step-by-step instructions on getting started Docker Hub.

-
-
- -
-
-
-
- - secure - -
-

Manage access tokens

-

Create personal access tokens as an alternative to your password.

-
-
-
-
-
- Stacked windows -
-

Official images

-

A curated set of Docker repositories hosted on Docker Hub.

-
-
-
-
-
- Release notes -
-

Release notes

-

Find out about new features, improvements, and bug fixes.

-
-
-
-
- - - diff --git a/docker-hub/quickstart.md b/docker-hub/quickstart.md new file mode 100644 index 0000000000..2f740d2213 --- /dev/null +++ b/docker-hub/quickstart.md @@ -0,0 +1,194 @@ +--- +description: Docker Hub Quickstart +keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, accounts, organizations, repositories, groups, teams +title: Docker Hub Quickstart +redirect_from: +- /apidocs/docker-cloud/ +- /docker-cloud/ +- /docker-cloud/migration/ +- /docker-cloud/migration/cloud-to-swarm/ +- /docker-cloud/migration/cloud-to-kube-aks/ +- /docker-cloud/migration/cloud-to-kube-gke/ +- /docker-cloud/migration/cloud-to-aws-ecs/ +- /docker-cloud/migration/deregister-swarms/ +- /docker-cloud/migration/kube-primer/ +- /docker-cloud/cloud-swarm/ +- /docker-cloud/cloud-swarm/using-swarm-mode/ +- /docker-cloud/cloud-swarm/register-swarms/ +- /docker-cloud/cloud-swarm/register-swarms/ +- /docker-cloud/cloud-swarm/create-cloud-swarm-aws/ +- /docker-cloud/cloud-swarm/create-cloud-swarm-azure/ +- /docker-cloud/cloud-swarm/connect-to-swarm/ +- /docker-cloud/cloud-swarm/link-aws-swarm/ +- /docker-cloud/cloud-swarm/link-azure-swarm/ +- /docker-cloud/cloud-swarm/ssh-key-setup/ +- /docker-cloud/infrastructure/ +- /docker-cloud/infrastructure/deployment-strategies/ +- /docker-cloud/infrastructure/link-aws/ +- /docker-cloud/infrastructure/link-do/ +- /docker-cloud/infrastructure/link-azure/ +- /docker-cloud/infrastructure/link-packet/ +- /docker-cloud/infrastructure/link-softlayer/ +- /docker-cloud/infrastructure/ssh-into-a-node/ +- /docker-cloud/infrastructure/docker-upgrade/ +- /docker-cloud/infrastructure/byoh/ +- /docker-cloud/infrastructure/cloud-on-packet.net-faq/ +- /docker-cloud/infrastructure/cloud-on-aws-faq/ +- /docker-cloud/standard/ +- /docker-cloud/getting-started/ +- /docker-cloud/getting-started/intro_cloud/ +- /docker-cloud/getting-started/connect-infra/ +- /docker-cloud/getting-started/your_first_node/ +- /docker-cloud/getting-started/your_first_service/ +- /docker-cloud/getting-started/deploy-app/1_introduction/ +- /docker-cloud/getting-started/deploy-app/2_set_up/ +- /docker-cloud/getting-started/deploy-app/3_prepare_the_app/ +- /docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/ +- /docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/ +- /docker-cloud/getting-started/deploy-app/6_define_environment_variables/ +- /docker-cloud/getting-started/deploy-app/7_scale_the_service/ +- /docker-cloud/getting-started/deploy-app/8_view_logs/ +- /docker-cloud/getting-started/deploy-app/9_load-balance_the_service/ +- /docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/ +- /docker-cloud/getting-started/deploy-app/11_service_stacks/ +- /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/ +- /docker-cloud/apps/ +- /docker-cloud/apps/deploy-to-cloud-btn/ +- /docker-cloud/apps/auto-destroy/ +- /docker-cloud/apps/autorestart/ +- /docker-cloud/apps/auto-redeploy/ +- /docker-cloud/apps/load-balance-hello-world/ +- /docker-cloud/apps/deploy-tags/ +- /docker-cloud/apps/stacks/ +- /docker-cloud/apps/ports/ +- /docker-cloud/apps/service-redeploy/ +- /docker-cloud/apps/service-scaling/ +- /docker-cloud/apps/api-roles/ +- /docker-cloud/apps/service-links/ +- /docker-cloud/apps/triggers/ +- /docker-cloud/apps/volumes/ +- /docker-cloud/apps/stack-yaml-reference/ +- /docker-cloud/installing-cli/ +- /docker-cloud/docker-errors-faq/ +- /docker-cloud/release-notes/ +- /docker-store/ +- /apidocs/ +- /apidocs/overview/ +--- + +The following section contains step-by-step instructions on how to easily get started with Docker Hub. + +### Step 1: Sign up for a Docker account + +Let's start by creating a [Docker ID](https://hub.docker.com/signup){: target="_blank" rel="noopener" class="_"}. + +A Docker ID grants you access to Docker Hub repositories and allows you to explore images that are available from the community and verified publishers. You'll also need a Docker ID to share images on Docker Hub. + +### Step 2: Create your first repository + +To create a repository: + +1. Sign in to [Docker Hub](https://hub.docker.com){: target="_blank" rel="noopener" class="_"}. +2. Click **Create a Repository** on the Docker Hub welcome page. +3. Name it **<your-username>/my-private-repo**. +4. Set the visibility to **Private**. + + ![Create Repository](images/index-create-repo.png) + +5. Click **Create**. + + You've created your first repository. You should see: + + ![Repository Created](images/index-repo-created.png) + +### Step 3: Download and install Docker Desktop + +You'll need to download Docker Desktop to build, push, and pull container images. + +1. Download and install [Docker Desktop](../desktop/index.md). + +2. Sign in to the Docker Desktop application using the Docker ID you've just created. + +### Step 4: Pull and run a container image from Docker Hub + +1. Run `docker pull hello-world` to pull the image from Docker Hub. You should see output similar to: + + ```console + $ docker pull hello-world + Using default tag: latest + latest: Pulling from library/hello-world + 2db29710123e: Pull complete + Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 + Status: Downloaded newer image for hello-world:latest + docker.io/library/hello-world:latest + ``` + +2. Run `docker run hello-world` to run the image locally. You should see output similar to: + + ```console + $ docker run hello-world + Hello from Docker! + This message shows that your installation appears to be working correctly. + + To generate this message, Docker took the following steps: + 1. The Docker client contacted the Docker daemon. + 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. + (amd64) + 3. The Docker daemon created a new container from that image which runs the + executable that produces the output you are currently reading. + 4. The Docker daemon streamed that output to the Docker client, which sent + it to your terminal. + + To try something more ambitious, you can run an Ubuntu container with: + $ docker run -it ubuntu bash + + Share images, automate workflows, and more with a free Docker ID: + https://hub.docker.com/ + + For more examples and ideas, visit: + https://docs.docker.com/get-started/ + ``` + +### Step 5: Build and push a container image to Docker Hub from your computer + +1. Start by creating a [Dockerfile](../engine/reference/builder.md) to specify your application as shown below: + + ```dockerfile + # syntax=docker/dockerfile:1 + FROM busybox + CMD echo "Hello world! This is my first Docker image." + ``` + +2. Run `docker build -t /my-private-repo .` to build your Docker + image. + +3. Run `docker run /my-private-repo` to test your +Docker image locally. + +4. Run `docker push /my-private-repo` to push your Docker image to Docker Hub. You should see output similar to: + + ![Terminal](images/index-terminal.png) + + >**Note** + > + > You must be signed in to Docker Hub through Docker Desktop or the command line, and you must also name your images correctly, as per the above steps. + +5. Your repository in Docker Hub should now display a new `latest` tag under **Tags**: + + ![Tag Created](images/index-tag.png) + +Congratulations! You've successfully: + +- Signed up for a Docker account +- Created your first repository +- Pulled an existing container image from Docker Hub +- Built your own container image on your computer +- Pushed it successfully to Docker Hub + +### Next steps + +- Create an [organization](orgs.md) to use Docker Hub with your team. +- Automatically build container images from code through [builds](builds/index.md). +- [Explore](https://hub.docker.com/explore) official & publisher images. +- [Upgrade your subscription](https://www.docker.com/pricing) to push additional private Docker images to +Docker Hub. From 2a0b07210cc6e4f0cce44b64e54388c09b5d33af Mon Sep 17 00:00:00 2001 From: jerae-duffin <83294991+jerae-duffin@users.noreply.github.com> Date: Tue, 20 Dec 2022 13:31:17 -0600 Subject: [PATCH 4/4] Update docker-hub/index.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- docker-hub/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index 51f963252f..3a725196db 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -52,7 +52,7 @@ Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: quickstart

Quickstart

-

Step-by-step instructions on getting started Docker Hub.

+

Step-by-step instructions on getting started on Docker Hub.