During the practice myself, I usually run the container image that was given from the questions.
Likewise, am I supposed to be given a specific container image from the question on the exam?
If yes, just do 'podman run (whatever conf like port, name, bind-mounting) given imagename'?
Another question is that I know it's important to change ownership of directory when mounting container from hostdir to containerdir. For ex, /home/user/mysql:/var/lib/mysql:Z, in this case, the ownership of mysql dir must be appropriately configured. I used podman inspect imagename |grep User so that I can get UID GID. However, the UID of the above command will only show up once container is running. How can I get the proper UID for directory before running container?
Lastly, I'm wondering what exactly these port do in this command 'podman run -p 8080:80 ~~~~'
Thank you!
Alright! my bad.. thank you for the answer!
First and second were redhat.io and access.com and showed errors.
Are these error occurred due to login status?
I tried docker.io registry at the end, and it showed uid gid as 0. Is this correct?
podman image inspect mysql showed 999 UID and GID
Is this right?
The error is that after I ran the container, I couldn't see the UID
Could anyone give a solution?
Hi @spurs,
I think the "User" field comes from either the "USER" instruction inside of Containerfile/Dockerfile or "podman run --user xxx" option. I guess you are using "docker.io/library/mariadb" then neigher of them will be applied. You may want to try the mariadb-105 image from Red Hat. That Containerfile has specified the USER instruction.
USER 27 ENTRYPOINT ["container-entrypoint"] CMD ["run-mysqld"]
Thereby the podman inspect command can retrieve the UID.
Same for that RH mysql image. The "Get this image" tab will guide you how to pull the image.
Hi tnishiok,
Thanks for the answer. I tried your instruction, but I still couldn't see UID (exec worked tho)
+Do I expect to get a Fully Qualified Imae Name during the exam? This is my concern
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.