Docker Flashcards

1
Q

What is containerization?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How are containers different from virtual machines?

A

Unlike VMs, containers discretely share the same host operating system kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Docker image? container?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List the steps to create a Docker image and spin up a container

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the benefit to an image being built in Layers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some other Docker commands?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Docker compose and why is it useful?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly