Debug School


Posted on

Day 1 Docker - Assignment

What is Docker?

  • Docker is container management tool

Why We need docker?

  • To save time (number of  applications can run at a time)- To save cost (CPU, less RAM ,storage,operational cost will be less) - Improve software quality (quality coding,quality testing)

What is Container?

  • Container is lightweight (minimal resources) application runtime environment without kernel
  • Container is resources created by namespaces and together powered by kernel

How Container Works?

  • docker will request kernel to create independent computational resources like network,PID,mount and username, those  all resources combined and creates a runtime environment.

    • When client request for docker image (if not available local,will be fetched from repo) and kernel will create user and will be assigned to computational resources like network,PID,mount and username

How to install Docker?

  • Docker provides convenience scripts at
  • Step 1 – Download and Run the script.
  • $ curl -fsSL -o
  • $ sudo sh
  • Step 2 – Enable Docker
  • $ sudo systemctl enable docker
  • Step 3 – Start Docker

  • $ sudo systemctl start docker

  • Step 4 – Verify that docker is installed correctly by running the hello-world image.

  • $ sudo docker run hello-world

What are the components docker?

  • docker engine,docker images,registry,container

What is a container lifecycle commands?

  • create,start,stop,restart,pause,unpause,kill,remove

What is docker pause/unpause?

  • docker pause: Memory will be used but CPU allocations will be paused (no access to container)
  • docker unpause: Memory will be used but CPU allocations will be re allocated ( access to container)
  • this commands works with respect to accessing the resources

What is docker stop/kill?

  • docker stop : graceful stopping (first child process will be killed, later parent process will be killed)
  • docker kill :  forcefully kills the container ( Directly parent process will be killed )

How to get inside a container?

  • by using shell

How to access container from outside?

  • by using network

What is the rule for container is running?

  • PID1 has to run with anything (because no kernel in the container) which should not be excited.

Top comments (0)