Lab and Assignment 1 For 25 Oct 2021 – Docker Session – MS

What is Docker and Container?

Docker image is blueprint of the container (application files + dependencies + filesystem), where as container is running instance of that image
Docker image is created once and multiple Container instance can be created from same image
Docker image just requires disk space as its logical , where as container instance requires computation resource + memory space

Containers also isolate applications from each other on a shared OS

Difference between docker pause and unpause?

The docker pause command suspends all processes in the specified containers. On Linux, this uses the freezer cgroup. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.

The docker unpause command un-suspends all processes in the specified containers. On Linux, it does this using the freezer cgroup.

What is the difference between docker stop and kill?

A docker STOP command issues a SIGTERM signal to the main process running within the container, while KILL command issues a SIGKILL signal to the process.