Month End Sale: Get Extra 10% OFF on Job-oriented Training! Offer Ending in
D
H
M
S
Get Now

Docker Basics

Level : Beginner
Mentor: Shailendra Chauhan
Duration : 00:02:00

Docker File

The text file contains a sequence of commands for creating a Docker image. Its content structure and command syntax identify it as a Dockerfile even without an extension. 

Dockerfile commands

Following are the commands of Dockerfile:

  • FROM
  • COPY
  • ADD
  • RUN
  • CMD
  • ENTRYPOINT
  • MAINTAINER
  • VOLUME
  • ENV

Docker Image

A Docker image is a small, self-contained package that has all of the necessary components to run an application. It is assembled using the Docker build command and stored in registries such as Docker Hub, which contain layered references to other images.

 

Create a Docker Image

To define the Docker machine, run the command: eval "$(docker-machine env default)" to create modified Docker images.

Pull a Docker Image

To pull the Docker image, use the command "# docker pull <repository>".

Change the Docket Image Name

To modify the name of a Docker image, use the command "$ docker tag image id new name".

Remove the Docker image

To remove a Docker image, use the command: $ docker rmi image id.

Docker Container

A container is a running version of a Docker image. A docker container is a separate and secure shipping container. Run using the docker run command.

Convert an Image to a Container

To convert an image into a container, execute the command "#docker run --image name".

Set a Connection to the Docker Containers

The Docker network functionality allows you to connect to Docker containers using either user-defined bridges or the default bridge.connect.

What is Docker Registry?

A Docker registry is a system that stores and distributes Docker images under particular names.

Different types of Registries

  • Docker Hub - (Free for public images and Paid for private images)​
  • Docker Trusted Registry - (on-prem or on-cloud)​

Docker Registry Uses

  • The Docker registry allows us to save our images.
  • The development process can be automated.
  • Image can be secured using a private docker registry.

Types of Docker Registries

  • DockerHub
  • Amazon Elastic Container Registry (ECR)
  • Google Container Registry (GCR)
  • Azure Container Registry (ACR)

Working on Docker Registry

  • The Docker Registry is where Docker images are stored and distributed.
  • Users contribute photos that include version and name tags.
  • Others seek for and download files from the registry.
  • It is possible to host it yourself or use a cloud service.

Docker Hub

Docker Hub, a cloud-based repository, provides a platform for both public and private container images, allowing for easy development, testing, storage, and distribution.

Self-paced Membership
  • 22+ Video Courses
  • 800+ Hands-On Labs
  • 400+ Quick Notes
  • 55+ Skill Tests
  • 45+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this