Lab and Assignment For 25 Oct 2021 – Docker Session – Senthil

Assignment# 1 – What is Docker and Container? Define in 15 points with example image

Docker:

  1. Docker is container management platform
  2. There are two major Docker components – Docker Engine and Docker Image
  3. Docker Engine is a collection of Docket client, service
  4. Docket container is collection of ContainerD service and interface to Kernel services
  5. Docker Image is a collection of file systems and versions of file systems
  6. Docket images contains ROOT file system + User file system and Application file system
  7. Container is light weight isolated run time environment to host an application
  8. Container is the run time instance of the container image
  9. Container instance has a lifecycle of create, start, stop, pause, unpause, kill, remove
  10. Container instance can contain 1 MNT from image, 1 NET from NET NS, 1 PID TREE from PID TREE NS, 1 USER from USER NS
  11. Container is a collection of resource like MNT, NET, PID TREE to USER

Assignment# 2 – What is the difference between docker pause and unpause?

Docker pause and unpause uses cgroups freezer which freezes and unfreezes the user spaces tasks which is used to schedule the hardware resources of the system. basically, it attaches/detaches the resources to the container instance.

Assignment# 3 – What is the difference between docker stop and kill?

Stop and kill uses SIGTERM and SIGKILL to stop and kill the container instances.

Assignment# 3 – What is the difference between docker stop and kill?

Stop and kill uses SIGTERM and SIGKILL to stop and kill the container instances.

Assignment# 4:

Docker commands –

Update – This command is used to update configuration of one or more containers with respect to resources like CPU, memory, restart policy or autoremove policy

Wait – This command is used to wait for one or more containers to exit and print their exit codes