1. What is Docker and Container? Define in 15 points with example image.

Docker is an open source platform tool for building, deploying, and managing containerized applications.

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space.

2. What is the difference between docker pause and unpause?

The docker kill, docker stop and docker pause are commands used to stop container processes. Docker stop releases the memory used after the container is stopped, but docker pause would still keep memory portion while the container is paused. This memory is used when the container is resumed.

The docker unpause un-suspends all processes in the specified containers.

3. What is the difference between docker stop and kill?

KILL and STOP are two different commands used in docker to stop a container from execution.

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.

Docker STOP leads to a safe exit while docker KILL leads to an unsafe exit

If a process doesn’t exit for a STOP command within a specified timeout, docker issues a KILL command implicitly. The default number of seconds the command will wait before killing is 10 seconds.

4. Docker Update & Docker Wait

The docker update command dynamically updates container configuration. This command is used to prevent containers from consuming too many resources such as CPU and memory from their docker host.

The docker wait command blocks until one or more containers stop and then print their exit codes.

Facebook Notice for EU! You need to login to view and post FB Comments!