concept Docker Hub in category docker

This is an excerpt from Manning's book Learn Docker in a Month of Lunches.
Docker also makes it easy to bring third-party software into your application, adding features without writing your own code. Docker Hub is a public service where teams share software that runs in containers. The CNCF publishes a map of open source projects you can use for everything from monitoring to message queues, and they’re all available for free from Docker Hub.
Software distribution is built into the Docker platform. You’ve already seen that you can run a container from an image, and if you don’t have that image locally, Docker will download it. The server that stores images centrally is called a Docker registry. Docker Hub is the most popular image registry, hosting hundreds of thousands of images, which are downloaded billions of times every month. It’s also the default registry for the Docker Engine, which means it’s the first place Docker looks for images that aren’t available locally.
# store your Docker ID in a variable - on Windows: $dockerId = '<your-docker-hub-id>' # or on Linux: dockerId='<your-docker-hub-id>' # tag the images with your own account name: docker image tag diamol/ch16-folder-list:linux-amd64 "$dockerId/ch16-folder-list:linux-amd64" docker image tag diamol/ch16-folder-list:linux-arm64 "$dockerId/ch16-folder-list:linux-arm64" docker image tag diamol/ch16-folder-list:linux-arm "$dockerId/ch16-folder-list:linux-arm" # and push to Docker Hub (this pushes all the tags for the image): docker image push "$dockerId/ch16-folder-list"

This is an excerpt from Manning's book Docker in Action, Second Edition.
The first time you run this command, Docker has to figure out whether the docker-inaction/hello_world image has already been downloaded. If it’s unable to locate it on your computer (because it’s the first thing you do with Docker), Docker makes a call to Docker Hub. Docker Hub is a public registry provided by Docker Inc. Docker Hub replies to Docker running on your computer to indicate where the image (docker-inaction/hello_world) can be found, and Docker starts the download.
Docker Hub is a registry and index with a web user interface run by Docker Inc. It’s the default registry and index used by docker and is located at the host docker.io. When you issue a docker pull or docker run command without specifying an alternative registry, Docker will default to looking for the repository on Docker Hub. Docker Hub makes Docker more useful out of the box.
Docker Inc. has made efforts to ensure that Docker is an open ecosystem. It publishes a public image to run your own registry, and the docker command-line tool can be easily configured to use alternative registries. Later in this chapter, we cover alternative image installation and distribution tools included with Docker. But first, the next section covers how to use Docker Hub so you can get the most from the default toolset.
Docker Hub is free to join, and you’ll need an account later in this book. When you’re signed in, you can star and comment on repositories. You can create and manage your own repositories. We will do that in part 2. For now, just get a feel for the site and what it has to offer.

This is an excerpt from Manning's book Docker in Practice, Second Edition.
Docker Hub is an excellent resource, but sometimes it can be slow—it’s worth pausing to decide how to best construct your Docker search command to get the best results. The ability to do searches without opening your browser offers you quick insight into possible items of interest in the ecosystem, so you can better target the documentation for images that are likely to fulfill your needs.
Because the Docker Hub is the canonical source of images, pushing there during your CI process can make some things more straightforward (distributing images to third parties, for one). Not having to run the build process yourself is easier and gives you some additional benefits, like a checkmark against the listing on the Docker Hub indicating that the build was performed on a trusted server.

This is an excerpt from Manning's book Docker in Action.
The first time you give the command, Docker has to figure out if dockerinaction/hello_world is already installed. If it’s unable to locate it on your computer (because it’s the first thing you do with Docker), Docker makes a call to Docker Hub. Docker Hub is a public registry provided by Docker Inc. Docker Hub replies to Docker running on your computer where dockerinaction/hello_world can be found, and Docker starts the download.
A hosted registry is a Docker registry service that’s owned and operated by a third-party vendor. Docker Hub, Quay.io, Tutum.co, and Google Container Registry are all examples of hosted registry providers. By default, Docker publishes to Docker Hub. Docker Hub and most other hosted registries provide both public and private registries, as shown in figure 9.2.
The example images used in this book are distributed with public repositories hosted on Docker Hub and Quay.io. By the end of this section you’ll understand how to publish your own images using hosted registries and how hosted registries measure up to the selection criteria.
Distributing your work with automated builds requires two components: a hosted image repository and a hosted Git repository where your image sources are published. Git is a popular distributed version-control system. A Git repository stores the change history for your project. Although distributed version-control systems like Git don’t have architectural centralization, a few popular companies provide Git repository hosting. Docker Hub integrates with both Github.com and Bitbucket.org for automated builds.
Both of these hosted Git repository tools provide something called webhooks. In this context, a webhook is a way for your Git repository to notify your image repository that a change has been made to the source. When Docker Hub receives a webhook for your Git repository, it will start an automated build for your Docker Hub repository. This automation is shown in figure 9.3.
The automated build process pulls the sources for your project including a Dockerfile from your registered Git repository. The Docker Hub build fleet will use a docker build command to build a new image from those sources, tag it in accordance with the repository configuration, and then push it into your Docker Hub repository.
This Dockerfile will produce a simple Hello World image. The first thing you need to do to get this built into a new repository at Docker Hub is add it to your Git repository. The following Git commands will create a local repository, add the Dockerfile to the repository, commit the change, and push your changes to your repository on GitHub. Be sure to replace <your username> with your GitHub username:
Don’t add or commit your files to your repository yet. Before you push your work to GitHub, you should create a new automated build and repository on Docker Hub. You must perform this step through the website at https://hub.docker.com. Once you log in, click the Create button in the header and select Automated Build from the drop-down menu. The website will walk you through setting up the automated build.
The steps include authenticating with GitHub and granting Docker Hub limited access to your account. That access is required so that Docker Hub can find your repositories and register appropriate webhooks for you. Next, you’ll be prompted for the GitHub repository that you’d like to use for the automated build. Select the hello-docker repository that you just created. Once you complete the creation wizard, you should be directed to your repository page. Now go back to your terminal to add and push your work to your GitHub repository.