Section 1: Dive into Docker Flashcards
Why use docker?
Docker makes it easy to install software and run software without worrying about dependencies.
What is a docker?
Docker is a platform or ecosystem around creating and running containers.
What does docker ecosystem compose of?
Docker Client, Docker Server, Docker Machine, Docker Images, Docker Hub, Docker Compose.
What happens in an overview when you create a
docker?
The docker CLI fetches corresponding docker image from docker hub and creates an instance of that image (docker).
Docker has it’s own resources - Networking, Hardware, Space and Memory .
What is a docker image?
Docker image is a single file with all dependencies and config required to run a program.
What is the docker software composed of?
The docker software is composed of docker client (docker CLI) and docker server(docker daemon)
what happens under the hood when you run :
e.g. docker run hello-world?
The command is used to run a docker associated with the image file hello-world. Here hello-world is the docker image.
When this command is entered, the Docker CLI passes the control over to Docker Server, which looks for the image in local image cache.
If the image is not found in local image cache, then ‘Docker Hub’ is checked for the image.
Docker Hub is a free public docker image repository.
Local Docker Hub
===== ============
Docker Client Docker Images
|
Docker Server
|
Local Image Cache
\
The required image is not in local cache is fetched from docker hub and stored in cache, loaded into memory and the docker is created and the start command in the docker is run. .
How does a container structure with isolated resources look like?
Look at google doc.
How does installing docker work on windows if only linux OS has concepts of namespaces and cgroups.
Installing docker runs a linux virtual machine which in turn hosts containers for us. This linux virtual machine incorporates namespaces and cgroups to allocate resources to dockers.
Look at google doc for picture.