Containers Flashcards
What are key technologies needed in containers?
1) namespaces
2) cgroups
3) SELinux
4) Sec Comp
What is the purpose of cgroups?
set limitations on system resources such as memory and cpu.
What is the purpose of sec comp?
define allow and deny list of system calls from namespaces.
Known container runtimes
1) Cri-O
2) Docker
3) Runc
Purpose of container management tools
Allows you to communicate with the container engine / runtime
Examples of container management tools
1) Docker
2) Podman
3) K8S
Install podman
dnf install container-tools
List containers currently running
podman ps
List images downloaded for your user account
podman images
Download image quay.io/centos7/nginx-114-centos7
podman pull quay.io/centos7/nginx-114-centos7
How to find images
podman search
Delete image from your local account
podman image rm quay.io/centos7/nginx-114-centos7
Run container quay.io/centos7/nginx-114-centos7
podman run -d quay.io/centos7/nginx-114-centos7
What is your container storage location?
~/.local/share/containers/storage
Start an interactive terminal to the container called relaxed_dirac
podman exec -it relaxed_dirac bash
List all podman commands
1) podman tab tab
2) man podman
Use an image file stored on your local storage
podman load
Start a container with name silabus
podman run -d --name sylabus quay.io/centos7/nginx-114-centos7
Login into a registry
podman login -u user -p password quay.io
List images available in a registry
podman search registry.lab.example.com/
(with ending slash)
Without downloading an image review its metadata
skopeo inspect docker://quay.io/ubi8/python-38
Build an image using a container file
podman build -t python39:1.0 path/to/container/file/.
Show the property of an image that is in local storage
podman inspect localhost/python39:1.0
podman create
create a container without starting it