Enterprise 8 package management Flashcards
What’s the difference between binary and source packages?
Binary are install ready. They have .rpm extension and contain install scripts. This has everything you need to install something.
Source come with original unmodified version of software that may be unpackaged, modified as desired, and repackaged in binary format. End with .src
Name the different fields:
openssl-1.1.1-8.el8.x86_64
openssl : name
1.1.1 : version
8 : release
el8 : Enterprise Linux 8 (not all packages have this)
x86-64 : processor
Where is package metadata stored? This will include dependencies
/var/lib/rpm
What command would you use if your trying to pull a package from a repo and it’s giving you meta data back. Also, if you turn off the gpg check it works.
Rename an image that only has an image id
Import all GPG keys to keyring
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Show GPG keys on keyring
rpm -qa gpg-pubkey*
Shows info on a certain gpg key
gpg-pubkey-db42a60e-37ea5438
podman image tag 12tg9824ht2t new_name
If you wanted to make changes to all repos, what file would you modify?
/etc/yum.conf
We’re making a repo that links to a server that requires authentication, how would you do this?
baseurl=http://user:password@www.example.com/repo/
baseurl=joshc:password@www.example.com/repo/
What is a container
What is an image?
Process has it’s own namespace and is separate from other processes. The container is sandboxed.
Image - binary, code. Empty file system which is a parent of bare bones of an OS which is a parent of sshd which is a parent of an application. Like multiple snapshots.
Copy a container image from one registry to another
Registry - repo or collection of repos.
First part is from, last part is to:
skopeo copy docker://quay.io/skopeo/stable:latest docker://registry.example.com/skopeo:latest
Diff between container and vm
VM is the whole os
Container is the library and the app.
These are ran in an isolated environment created by Kernel namespaces
Difference between podman and docker
podman is daemonless and open source.
Podman containers can be ran by root or by a non-privileged user
What are linux namespaces?
Partition of kernel resources
execute a command on a machine via podman
podman exec test2 ifconfig eth0
What is IPC?
Interprocess communication (IPC) comm channel between two aps
What is UTS?
Unix time-sharing namespace
allows single system to appear to have diff host and domain names to a diff process.
Create a container with the name test 3 and a hostname of test3.example.com out of docker.io/alpine
podman run -it –name test –hostname=test3.example.com docker.io/alpine sh
uname -a (to double check)
If you log into your container and run the ps -ef command, you’ll see the shell is ran as root/1. Make this run as user 12345 instead, will this show up this way on your regular machine?
podman run -it –name=test4 –user 12345 docker.io/alpine sh
yes
ps -ef | grep 12345
Normally your container has access to all resources your host does.
Show it’s resources.
Create a container that can only use 50 Megs of mem and make it run in the background
CGropu limits app to set of resources so control groups allow us to share avail hardware to containers
podman stats test1
podman run -it –name=test6 –memory=50M -d alpine sh
What is UnionFS?
Union file system
file system that operate by creating layers
What is a registry?
Where can you see what registries podman will automatically search?
Stores images
podman info
grep *registries /etc/containers/registries.conf
Sometimes you will see the below errors:
Error relocating /lib/ld-mus1-x86_64.so.1: RELRO protection failed: permission denied
Error relocating /bin/echo: RELRO protection failed: Permission denied
What should you do?
sudo restorcon -R ~/.local/share/containers/storage/overlay*
search podman for ubuntu, only show the top 3 results
podman search ubuntu –limit 3