Run Containers Flashcards
What command do you use to install container-tools?
sudo dnf install container-tools
What command is used to make a registry in your home directory?
mkdir -p ~/.config/containers/
What command is used to used the /tmp/registries.conf file as a template?
cp /tmp/registries.conf ~/.config/containers/
What command is used to login to container registry with the podman login command?
podman login <container></container>
What command is used to view information about the image?
skopeo inspect docker://registry.lab.example.com/rhel8/mariadb-103
What command is used to start a detached container to obtain the mysql UID and GID?
podman run -d –name inventorydb -p 13306:3306 \
-e MYSQL_USER=operator1 \
-e MYSQL_PASSWORD=redhat \
-e MYSQL_DATABASE=inventory \
-e MYSQL_ROOT_PASSWORD=redhat \
-v /home/podsvc/db_data:/var/lib/mysql/data:Z \
registry.lab.example.com/rhel8/mariadb-103:1-86
What command is used to confirm the database is running?
~/containers-review/testdb.sh
What command do you use to login directly as the user to configure the systemd daemon?
ssh user@host
What command do you use to create the systemd configuration directory?
mkdir -p ~/.config/systemd/user
What command do you use to change to the directory where you will be placing the systemd unit file from the running container?
podman generate systemd –name inventorydb –file –new
What command is used to create the systemd unit file from the running container?
podman generate systemd –name inventorydb –files –new
What command is used to stop and then delete a container?
podman stop <container>
podman rm <container></container></container>
What command is used to reload the systemd daemon?
systemctl –user daemon-reload
What command is used to enable start the container-inventorydb service?
systemctl –user enable –now container-inventorydb.service
What command is used to confirm that the confirm that the container is running?
~/containers-review/testdb.sh
podman ps