Containers Flashcards

1
Q

What are the benefits of Virtualisation in cloud computing?

A
  • Server Consolidation
  • Isolation
  • Resource Management
  • Security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some drawbacks of Virtualisation?

A
  • Highly resource intensive
  • Slow to start
  • Tricky to create and manage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why do we use containers instead of VMs?

A

Lightweight alternative
-starts almost instantainiously
-less resource intensive
-easier to create

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

What are Containers

A

Designed to encapsulate an applivation and its dependancies
Sits on top of the kernal of a Host OS
Feel like VMs, but are much more light weight - (The code is actualy just running on the OS but just shielded from the rest of the OS with some ‘smoke’ and ‘mirrors’.
EXAMPLE CONTAINERS: Docker, PodMan, Kubernates, OpenShift.

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

What is a Dockerfile

A

A script containing instructions on how to build a Docker image.

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

How would you create and run a doker image from a dockerfile.

A

Dockerfile name: Dockerfile
Example:
docker build -t hello-world . - This will build an image called hello-world
-t is used to specify a name and optionally a tag in the name:tag format
. at the end specifies to use the current directory,
docker run hello-world - this will run the docker container

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

What are the elements of a Dockerfile?

A
  • Base Image (What image to base the build on)
  • Instructions (Steps to build the image e.g. Install dependancies,copping files, config envirnoment)
  • Commands
  • Expose ports
  • Entrypoints (Comand for when a container is started)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is the Linux Kernal used in containerisation?

A

The Linux kernal plays a crutial role in enabling containertisation through:
Namespaces:
these isolate process groups, providing each conatiner with its own view of the System resources, such as network, processes and mount points.

Control Groups (cgroups):
these manage resource allocation and usage for containers, ensuring fair resource distribution (e.g. a container can’t hog all the memory and CPU)

Union File System:
These allow containers to share a read-only base file system while maintaining separate writeable layers

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