Creation of Dockerhub account
Docker Hub: It is a service provided by Docker for finding and sharing container images with our team. Key features include: Private Repositories: Push and pull container images. Automated Builds: Automatically build container images from GitHub and Bitbucket and push them to Docker Hub.
Users get access to free public repositories for storing and sharing images or can choose a subscription plan for private repositories.
What is the use of Docker Hub repository?
Docker Hub repositories allow you share container images with your team, customers, or the Docker community at large. Docker images are pushed to Docker Hub through the docker push command. A single Docker Hub repository can hold many Docker images.
Docker Hub provides the following major features:
Repositories: Push and Pull container images.
Teams and Organization: Manage access to private repositories of contanier images.
Docker Offical Images: Pull and use high-quality container images provided by Docker.
Docker Verified Publisher Images: Pull and use high-quality container images provided by extrernal vendors.
Builds: Automatically build container images from GitHub and push them to Docker Hub.
Webhooks: Trigger actions after a successful to repository to integrate Docker Hub with other services.
The following steps containes instructions on how to easily get Login to Docker Hub.
Step 1: Sign up for Docker account.
Follow the link below to create a Docker ID.
Step 2: Create your first repository.
Sign in to https://hub.docker.com/
Click and create a Repository on the Docker Hub welcome page.
Name it in <Your-username>.
Set the visibility to private.
Click create.
You have created your first repository.
Step 3: Download and Install Docker Desktop:
You will need to download Docker desktop to build, push and pull container images.
Download and install Docker desktop by following link given below
Sign in to the Docker desktop application using the Docker ID you have just created.
Step 4: Pull and run a container image from Docker Hub:
Run the following command to pull the image from Docker Hub.
Run the image locally.
Then the output will be similar to;
Step 5: Build and push a container image to Docker Hub from your computer:
Start by creating a Dockerfile to specify your application.
Run the command to build your Docker image.
Run your Docker image locally.
Login in to a Docker registry.
Options:
--password , -p
password
--password-stdin
take the password from stdin
--username , -u
username
Push your Docker image Docker Hub.
Your repository in Docker Hub should now display new Latest tags under Tags.