Docker

"Docker is a set of platform-as-a-service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating-system kernel and are thus more lightweight than virtual machines." (Wikipedia)

To get an environment where you can manipulate individual containers: sudo apt install docker.io

To get container images from a remote registry: sudo docker pull docker.io/busybox:latest sudo docker pull registry.redhat.io/rhel8/rsyslog
 * 1) sudo docker pull [: ]/[ /] :

To see the images on your system: sudo docker images

To look at the metadata associated with an image: sudo docker inspect docker.io/busybox:latest

To run a container image: sudo docker run --name=myrsyslog -d registry.redhat.io/rhel8/rsyslog

To run a command inside a container:

Note: after the container runs the command, the container exits and is deleted (--rm). sudo docker run --rm docker.io/busybox:latest ls /bin

To run an interactive shell inside a container: sudo docker run --name=mybusybox -it docker.io/busybox:latest /bin/sh

To list running, stopped and exited containers: sudo docker ps -a

To start an exited container again: sudo docker start -ai mybusybox

To investigate within a running container: sudo docker exec -it myrsyslog /bin/bash

To stop a container: sudo docker stop myrsyslog

To remove a container: sudo docker rm myrsyslog

If you want to clear out all your containers: sudo docker rm $(sudo docker ps -a -q)

To remove images you no longer need: sudo docker rmi docker.io/busybox

If you want to clear out all your images: sudo docker rmi -f $(sudo docker images -a -q)

Set up a container to start as a systemd service: setsebool -P container_manage_cgroup on cat </etc/systemd/system/rsyslog-container.service [Unit] Description=RSyslog container [Service] Restart=always ExecStart=/usr/bin/sudo docker start -a myrsyslog ExecStop=/usr/bin/sudo docker stop -t 2 myrsyslog [Install] WantedBy=local.target EOF systemctl enable rsyslog-container.service systemctl start rsyslog-container.service systemctl status rsyslog-container.service

Images: Docker Hub