Q1: What are the features of Docker?
A. Easy Modelling.
B. Version Control.
C. Application Isolation.
D. All of the above.
D. All of the above.
What are the benefits for a developer using Docker?
A. Standardization and Productivity.
B. CI Efficiency & Rapid Deployment.
C. Compatibility and Maintainability.
D. All of the above.
D. All of the above.
A Docker container is an instance of an image with a specific configuration.
A. True.
B. False.
A. True.
What is a Dockerfile?
A. A developer who loves Docker and containerization, frequently espousing its virtues.
B. Any report or document that Docker components produce.
C. Any folder or document to run Docker components.
D. A template used to describe the build of an image.
D. A template used to describe the build of an image.
Can we remove a paused container from Docker?
A. Yes.
B. No.
A. Yes.
(Normally, we should stop the running container before deleting (removing) it. So we
need to unpause the container first and stop this container before removing it. However,
we can still forcefully remove a container regardless of its status with “–force/-f” flag.)
Is Docker image OS-dependent?
A. Yes.
B. No.
A. Yes.
(Docker image is OS-dependent and Docker runtime (engine) supports this feature. For
example, an alpine-java image created specifically for an x86-64 environment will only
run on a Linux docker container engine (or a compatible engine). When you create a
School of Electrical Engineering & Computer Science
INFS3208 Cloud Computing
Docker image, it is typically built for a specific combination of operating system (such as
Linux) and CPU architecture (such as x86_64).)
A docker registry is a place to store and distribute docker _______.
A. Files.
B. Codes.
C. Images.
D. All of the above.
C. Images.
What is Docker?
Docker is a set of PaaS products that use OS level virtualization to deliver software packages called containers. Containers are isolated and bundle up their own software, libraries and configs, all containers ran by kernel more efficient than separate virtual machines.
What are the motivations to use this tech?
Docker enables you to separate your applications from your infrastructure so you can deliver
software quickly. With Docker, you can manage your infrastructure in the same ways you manage
your applications. By taking advantage of Docker’s methodologies for shipping, testing, and
deploying code quickly, you can significantly reduce the delay between writing code and running it
in production
What are Linux name spaces?
Namespaces are a feature of the Linux kernel that provides process isolation. They achieve
this by giving a group of processes its own virtualized view of system resources, such as the
network, filesystem, and process IDs, effectively creating a private operating environment.
What are C Groups?
A Linux kernel feature that manages and limits the resource
usage of processes. They are used to enforce constraints on how much CPU, memory, and disk
I/O a specific group of processes can consume from the host system.
How to Namespaces and C groups work together to enable containerization?
Namespaces build the container’s walls, isolating it from the host and other containers so it
cannot see or interact with outside processes.
Cgroups then determine the resources available within those walls, limiting how much CPU
and memory the containerized process can use to ensure it doesn’t disrupt the host. In essence,
namespaces provide isolation, while cgroups provide resource limitation
What is a docker image?
A read-only template with instructions for how to build / create a docker container. Often based on another images with additional customization.
What is a docker container
container is a runnable instance of an image. You can create, start, stop,
move, or delete a container using the Docker API or CLI. You can connect a container to one
or more networks, attach storage to it, or even create a new image based on its current state. By
default, a container is relatively well isolated from other containers and its host machine. You
can control how isolated a container’s network, storage, or other underlying subsystems are
from other containers or from the host machine. A container is defined by its image as well as
any configuration options you provide to it when you create or start it. When a container is
removed, any changes to its state that are not stored in persistent storage disappear
What is a docker file
Dockerfile is a text file that contains a collection of instructions and commands for building a docker
image and running as a container.
What is a docker registery
A Docker registry stores Docker images. Docker Hub is a public registry
that anyone can use, and Docker is configured to look for images on Docker Hub by default.
You can even run your own private registry. When you use the docker pull or docker run
commands, the required images are pulled from your configured registry. When you use the
docker push command, your image is pushed to your configured registry
What are some good practices for writing docker files?
Use dockerignore to omit files not necessary in the build.
Use multi-stage builds to allow for drastic size reduction of final image
Dont install unecessary packages only what you need
Decouple applicatoins: each container should only have one conern
Minimize number of layers (RUN, ADD, COPY) cmds
Remove cache after installs of upgrades