Docker Flashcards
What is containerization?
The packaging of software code with all its required components like libraries, frameworks and other runtime dependencies, such that they are isolated in their own “container”.
How are containers different from virtual machines?
Unlike VMs, containers discretely share the same host operating system kernel
What is a Docker image? container?
A Docker image is a read-only template that contains a set of instructions for creating a container that can run on the Docker platform. It provides a convenient way to package up applications and preconfigured server environments, which you can use for your own private use or share publicly with other Docker users.
List the steps to create a Docker image and spin up a container
Step 1: Create a Base Container.
Step 2: Inspect Images.
Step 3: Inspect Containers.
Step 4: Start the Container.
Step 5: Modify the Running Container.
Step 6: Create an Image From a Container.
Step 7: Tag the Image.
Step 8: Create Images With Tags.
What is the benefit to an image being built in Layers?
Layers are there, to save on computational effort when building images, and bandwidth when distributing (aka pulling and pushing) them. They use a copy-on-write filesystem to save on disk space for images and future containers.
What are some other Docker commands?
docker run – Runs a command in a new container.
docker start – Starts one or more stopped containers.
docker stop – Stops one or more running containers.
docker build – Builds an image form a Docker file.
docker pull – Pulls an image or a repository from a registry.
What is Docker compose and why is it useful?
Docker Compose is software used for defining and running multi-container Docker applications. It can handle multiple containers simultaneously in the production, staging, development, testing, and CI environment.