Docker - ENG - Coursera Flashcards
What does the Docker CLI run command do?
It runs an image as a container.
In this sample Dockerfile, what does the COPY instruction do?
FROM ubuntu:18.04
COPY . /app
RUN make /app
CMD python /app/app.py
It copies the contents of the current directory into the /app directory of the image as a new layer.
Which command names an image “my-app” and tags it “v1”?
Docker tag -n my-app -t v1 .
docker copy -v my-app:v1 .
docker build -n my-app v1 .
docker build -t my-app:v1 .
docker build -t my-app:v1 .
You can use the Docker COPY instruction to copy files both from your local machine and from remote URLs.
False
Which of the following are benefits of containers?
Each container runs its own operating system (OS).
Like virtual machines (VMs), containers virtualize your infrastructure.
Containers provide a standardized way to package and ship software.
Each container is fully isolated and therefore secure.
Containers provide a standardized way to package and ship software.
What is an image?
An isolated process running on a local or remote host with its own file system and networking.
A read-only file that contains the source code, libraries, and dependencies that are needed to run an application.
A text file that contains the commands and settings that will run a container and the apps running in that container.
A YAML file with key/value pairs specifying the attributes of a container.
A read-only file that contains the source code, libraries, and dependencies that are needed to run an application.
In this sample Dockerfile, what does the FROM instruction do?
FROM ubuntu:18.04
COPY . /app
RUN make /app
CMD python /app/app.py
It defines the base image, which in this case is Ubuntu version 18.04.
What does the docker build command do?
It uses an image to create a container.
It creates a Docker app.
It uses a Dockerfile to create an image.
It creates a Dockerfile.
It uses a Dockerfile to create an image.
You can use the Docker COPY instruction to copy files from your local machine to an image.
True
What does the Docker CLI build command do?
It builds an image from a Dockerfile. It builds a microservice that will run in an image. It builds a Dockerfile. It builds a new container. It builds a new cluster.
It builds an image from a Dockerfile.
Containers include a guest operating system in every instance.
False
In this sample docker build command, what does the -t option do? docker build -t my-app:v1 .
It gives the image the name “my-app” and the tag “v1”.
It tags the current working directory as the target location for the image being built.
It indicates that the version “v1” of “my-app” should be used when building the image.
It indicates that the files used to build the image are located in the current working directory.
It gives the image the name “my-app” and the tag “v1”.
You use the docker push command to distribute an image to a registry.
True
Which of the following is not handled by Kubernetes?
Scaling
Performing health checks
Provisioning and deployment
Automating app integration
Automating app integration
Which of the following two are container runtimes? Select all that apply.
CRI-O Correct rocket DRunner Kubernetes Docker
CRI-O
Docker