Containers Flashcards
(13 cards)
What is a container?
A process running on a machine that’s isolated from all other processes on that machine.
What is a container image?
It’s an isolated filesystem + some container configuration.
What is a container named volume?
It is a mount point managed by Docker that allows data to persist in a container.
What is the difference between a named volume and a bind mount?
A named volume is mostly managed by Docker and the main use case is data storage.
A bind mount is managed by the developer and the main use case is mounting the source code on the container to see how the application (on the container) reacts to source code changes in real time.
Does the single-responsibility principle hold for containers?
YES. One container should run one process.
What is container networking?
It’s the ONLY process that allows two containers to communicate.
What is the command to build an image?
docker build
What is the name of the file that specifies the details of the image?
Dockerfile
What is the command to run a container?
docker run
What is the command to show the active containers?
docker ps
What is the command to show the available images?
docker image ls
What is the command to create a containers network?
docker network create <network-name></network-name>