kerDoc Flashcards
What is a Container?
A way to package applications with all the necessary dependencies and configuration they need
What is a Portable Artifact?
Easily shared and moved around
What is a benefit of Containers?
Makes development and deployment more efficient
Where do Containers live?
In storage, in a Container Repository
Is there a public repository for Docker?
Yes, DockerHub
What types of things are usually in a Container?
Code - Node, .NET, Python
Databases
Storage?
If a technology already exists, should you make your own Docker for it?
Only if you want a lot of customization. Thee is likely already an official Docker container for every tech out there
What is a benefit of Containers?
Every dev has to install all the tech they need on their pc, and configure them for their local environment
Are Containers cross platform?
Yes
Is a container its own isolated environment?
Yes
Do containers automatically update and upgrade any tech they contain?
No
You can pick which specific version you want to run, and it will never change
Can you run all the tech in a Docker with one line of code?
No, you have to run one each
You can only run one Docker at a time on a pc
False, you can run several, even several different versions of the same tech, e.g. Postgres 9.6, Postgres 10.17
Developers often work with which group of people on containers?
Operations
What environmental configurations are needed on server?
Only Docker Runtime
Containers contain layers of what?
images (software)
For example, the Linux Base Image
What Linux base image is often used in containers?
alpine
Where is the Application layer, usually?
Application image on top
What would you type in the terminal to get a Docker Container to pull postgres 9.6?
docker run postgres:9.6
When you tell Docker to run a container and it is not installed locally, Docker will download it and start it
What is an advantage of using Layers?
When a dev wants to update some tech in a container, Docker will only download the layers of that tech that have changed
How would you run a docker file for postgres9.6 and create a superuser password from the terminal?
docker run -e POSTGRES_PASSWORD = mypass
How would you check to see what all containers are running from the terminal?
docker ps
Explain the difference between a Docker Image and a Docker container
Docker Image - The actual package, all the code and tech. It is considered an artifact. It does not run
Docker Container - After you pull an Docker Image and start it in your local environment, a container environment is created. A Docker Container is something that is currently running
Where are Docker Images stored locally on Windows?
C:\ProgramData\DockerDesktop ???
/var/lib/docker is mounted on the persistent Virtual Disk of the VM which is under C:\Users\Public\Documents\Hyper-V\Virtual hard disks ???
What command can you run to see your local Docker configuration?
docker info
What 2 layers do OS’s have?
OS Kernel
Applications
What does an OS Kernel control?
Hardware
Is there a different Kernel for every distribution of Linux?
No. Only 1
What part of an OS does a Virtual Machine virtualize?
Applications layer and OS Kernel
What part of an OS does a Docker virtualize?
Applications layer
Does a Virtual Machine use a host kernel?
No, it spins up its own
Typically, are Docker Images or Virtual Machines smaller
Docker Images
Docker Images = MBs
Virtual Machine= GBs
typically
Does a Virtual Machine start faster than a DI?
no way
Can a Virtual Machine or a DI run any OS on any OS host?
Virtual Machine
What can you use to run a Linux DI on Windows
Docker Toolbox
What version of Windows and after do you not need to use Docker Toolbox?
Windows 10
Docker Quickstart Terminal?
it is
Does Docker use the local host’s file system?
No, it creates its own virtual file system
What command can you use to see all Docker Images you have on your pc?
docker images
If you don’t chose a specific version of Docker Image to pull, what happens?
You will pull the latest version
What is one way to stop a running Docker Container?
Ctrl+c
What is detach mode and how can you run it?
When you don’t run Docker in detach mode, when you run a container, the terminal becomes unusable and you have to open another terminal. Detach allows us to keep using the same terminal
docker -d postgres
If some part of your Docker container crashes and you need stop and restart the whole thing, how would you do that?
docker stop (Docker Image ID)
docker start (Docker Image ID)
How can you get a list of all Docker containers running and not running?
docker ps -a
Create binding between a port that your host machine has and the container
yep