Assignment for docker day 1

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Q1. Explain What is Docker Container with image?

  • Docker images act as a set of instructions to build a Docker container, like a template.
  • Docker is used to create, run and deploy applications in containers.
  • Images can exist without containers, whereas a container needs to run an image to exist.
  • A Docker container is a virtualized runtime environment used in application development. It is used to create, run and deploy applications that are isolated from the underlying hardware.
Docker container Vs VM

Q2. What is the differenece between docker stop and docker kill?

Docker container lifecycle
  • KILL and STOP are two commands in docker used to stop a container from execution
  • STOP attempts to trigger a graceful shutdown by sending the standard POSIX signal SIGTERM, whereas kill just kills the process by default 
  • When we use the docker stop command, the main process inside the container receives SIGTERM signal, and after some time, SIGKILL. Also, it will release the memory used after the container is stopped.
  • When we use kill command the main process inside each container specified will be sent SIGKILL or any signal specified with option –signal.
  • Stopping a running Container means to stop all the processes running in that Container. Stopping does not mean killing or ending the process. A stopped container can be made into the start state, which means all the processes inside the container will again start

Q3. What is the differenece between docker pause and docker unpause?

  • The docker pause command suspends all processes in the specified containers. The memory portion would be there while the container is paused and again the memory is used when the container is resumed
  • The docker unpause command un-suspends all processes in the specified containers.