List of 20 docker commands and its use cases with example?

1. docker -version This command is used to get the currently installed version of docker 2. docker pull This command is used to pull images from the docker repository(hub.docker.com) 3. docker create This command is used to create container from an image 4. docker start This command is used to start the container 5. docker run This command is used to create and run a container from an image 6. docker ps This command is used to list the running containers

Read more

What is the difference between CMD vs Entrypoint?

CMD You can set default commands with parameters using the CMD instruction. If you run a Docker container without specifying any additional CLI commands, the CMD instruction will be executed. You can include an executable as the default command. However, if you choose to omit it, you will have to specify an ENTRYPOINT instruction along with the CMD instruction. If you have specified an argument along with the Docker run command, the default one specified using the CMD instruction will

Read more

List of docker file instructions and its Brief Summary?

FROM A FROM command allows you to create a base image such as an operating system, a programming language, etc. All the instructions executed after this command take place on this base image. It contains an image name and an optional tag name. If you already have the base image pulled previously in your local machine, it doesnÔÇÖt pull a new one. There are several pre published docker base images available in the docker registry. You can also push your

Read more

What is the difference between docker stop and kill?

docker stop The docker stop command stops the container gracefully and provides a safe way out. If a docker stop command fails to terminate a process within the specified timeout, the Docker issues a kill command implicitly and immediately. In Docker, there are two ways we can use the docker stop command to stop a process. We can use container Id or container name to stop a container. docker kill The docker kill command terminates the entry point process abruptly. The docker kill command causes an unsafe exit. In some cases, the docker container

Read more

Components of Docker and its Brief Summary

The Docker components are divided into two categories; basic and advanced. The basic components include Docker client, Docker image, Docker Daemon, Docker Networking, Docker registry, and Docker container, whereas Docker Compose and Docker swarm are the advanced components of Docker.  Basic Docker Components: Lets dive into basic docker components: Docker Client: The first component of Docker is the client, which allows the users to communicate with Docker. Being a client-server architecture, Docker can connect to the host remotely and locally. As

Read more