Lab and Assignment For 25 Oct 2021 – Docker Session – Senthil
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Assignment# 1 – What is Docker and Container? Define in 15 points with example image
Docker:
- Docker is container management platform
- There are two major Docker components – Docker Engine and Docker Image
- Docker Engine is a collection of Docket client, service
- Docket container is collection of ContainerD service and interface to Kernel services
- Docker Image is a collection of file systems and versions of file systems
- Docket images contains ROOT file system + User file system and Application file system
- Container is light weight isolated run time environment to host an application
- Container is the run time instance of the container image
- Container instance has a lifecycle of create, start, stop, pause, unpause, kill, remove
- 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
- 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