What is containerization?
What is created when a container is created is it Kernel space or user space?
User space is created for isolation. It uses linux utilities called namespace to isolate one container from other.
What are the benefits of containerization?
What are containers?
What is docker?
Docker is a container engine that is used to create containers.
What things does each container have its own?
A container will not show process related to other containers or host machine.You can assign memory and CPU to container. This can be done using docker or by kubernetes. Both have different ways.
What is used to map networking from docker container to host machine networking?
There is a bridge called docker0, which takes care of mapping the network interface inside the container to network interface on the host machine.
Which linux kernel features does docker use to achieve containerization?
It uses cgroups, namespaces, chroot and others to provide resource isolation.
Is the statement “Docker enables containerization” true? And elaborate
No, docker uses kernel to achieve containerization.
What does chroot feature provide?
chroot command allows every container to have its own root filesystem, which is completely distinct from root filesystem from host machine.
What does cgroup feature provide?
cgroup allows you to give resources, provide CPU, memory to particular containers.
control groups for collection of processes
How many types of containers are there?
Docker ecosystem
What is overlay network?
Which are the namespaces available in Linux?
1) PID namespace - a way to isolate processes.The container is only aware of its processes.
2) Network namespace
3) Mount namepsace create mounts inside container
4) IPC namespace - Memory segment - Semaphores - Queues(The two containers are able to create shared memory segments and semaphores with same name)
5) UTS namespace hostname, nis name
What does this command provide us >lsns
This gives us list of namespaces
Give example of sample Dockerfile that modifies default index.html of NGINX image
FROM nginx:latest
COPY index.html /usr/nginx/html/index.html
What is the difference between CMD and ENTRYPOINT in Dockerfile?
ENTRYPOINT [“/usr/bin/my-app”]
CMD [“help”]
What is a Hypervisor?
A hypervisor, also known as a virtual machine monitor, is a process that creates and runs virtual machines (VMs). A hypervisor allows one host computer to support multiple guest VMs by virtually sharing its resources, like memory and processing.
Different types of Hypervisors?
1) Bare metal run directly on the host’s hardware.
2) Hosted run as a software layer on an operating system, like other computer programs. (VirtualBox)
Why use Hypervisors?
Hypervisors make it possible to use more of a system’s available resources and provide greater IT mobility since the guest VMs are independent of the host hardware. This means they can be easily moved between different servers.
What is YAML?
YAML notation basics and what characters are used
flow style
Basics spaces are important!
”#” comment
“—” new document
“- “ Conventional Block Format
Sequence: “[milk, groceries, eggs, juice, fruits]”
Map: “{name: John Smith, age: 33}”
elements in start sequence [e1…
# only block style in start sequence
- e1
- e2
# Sequence, flow s.
- [x, x2]
# Sequence with map, flow s.
- [x, x3: h]
# Map block and flow mixed
- map:
map2: {e1: x, e2: x2}
map3:
- a
- a: xDatatypes in YAML