Redhat Linux 9 Lab: Managing Container Environment Variables in MariaDB
https://www.youtube.com/playlist?list=PLIpLw6v7Z1qmty_yT3KQUeV5jW46Wu7hG Link playlist
Red Hat Enterprise Linux Administration
2023 09 02 22 49 54
Exercise 26-6 Managing Container Environment Variables
1. Use podman run docker.io/library/mariadb. It will fail
(and you will see an error message on the STDOUT).
2. Use podman ps -a to see the automatically generated name
for the failing mariadb container.
3. Use podman logs container_name to see the Entrypoint
application error log. Make sure to replace container_name
with the name you found in step 2.
4. Use podman inspect mariadb and look for a usage line. You
won’t see any.
5. Use podman search registry.redhat.io/rhel9/mariadb to
find the exact version number of the mariadb image in the
RHEL registry.
6. Use podman login registry.redhat.io and provide valid
credentials to log in.
7. Use podman run registry.redhat.io/rhel9/mariadb-nnn
(make sure to replace nnn with the version number you
found in step 5). It will also fail but will show much more
usage details on the STDOUT. The reason is that the Red Hat
mariadb image is not the same as the image that was fetched
from the Docker registry in the first step of this procedure.
8. Use podman inspect registry.redhat.io/rhel9/mariadb-nnn
and in the command output search for the usage line. It will
tell you exactly how to run the mariadb image.
9. According to the instructions that you found here, type
podman run -d -e MYSQL_USER=bob -e
MYSQL_PASSWORD=password -e
MYSQL_DATABASE=mydb -e
MYSQL_ROOT_PASSWORD=password -p 3306:3306
registry.redhat.io/rhel9/mariadb-105. (By the time you
read this, the version number may be different, so make sure
to check the version number of the image if you’re
experiencing a failure in running this command.)
10. Use podman ps. You will see the mariadb container has now
been started successfully.
by Le Hoang Long Long
redhat openstack