Test Question:
Lab Start Command: [student@workstation ~]$ lab start persisting-mounting
Problem 1:
-
Examine the
~/DO188/labs/persisting-mounting/podman-python-server/Containerfilefile. This image uses the/serverdirectory as the web root directory for the Python HTTP server. Theregistry.ocp4.example.com:8443/redhattraining/podman-python-servercontainer image is based on this Containerfile.Provide the contents of the
Containerfile.
Problem 2:
-
Copy the
index.htmlfile to the~/wwwdirectory. The~/wwwdirectory serves as a bind mount that contains the HTML for the container.Provide the command used to copy the
index.htmlfile.
Problem 3:
-
Test the
podman-python-servercontainer with the~/wwwdirectory mounted as a bind mount.a) Provide the command used to start the container with the given parameters.
b) In a web browser, navigate to
localhost:8000. You are presented with an error.c) Provide the command used to check the container logs.
Problem 4:
-
Correct the permission for the
~/wwwdirectory.a) Provide the command used to verify the directory permissions in a new user namespace.
b) Provide the command used to verify the group ID inside of the
podman-servercontainer.c) Provide the command used to change the group of the
~/wwwdirectory and its content to thepython-servergroup ID.d) Provide the command used to verify the directory permissions in a new user namespace after making the changes.
Problem 5:
-
Retest the
podman-servercontainer with the~/wwwdirectory mounted as a bind mount.a) In a web browser, access
localhost:8000. You are presented with theindex.htmlpage.b) Provide the command used to stop the container.
Problem 6:
-
Create a named volume with the
index.htmlpage.a) Provide the command used to create a volume called
html-vol.b) Provide the command used to change into the
persisting-mountinglab directory.c) Provide the command used to import the
index.tar.gzarchive file into thehtml-volvolume.
Problem 7:
-
Start a new container that uses the
podman-serverimage. Use a volume mount instead of the bind mount.a) Provide the command used to start the
podman-servercontainer with the given parameters.b) In a web browser, access
localhost:8000. You are presented with theindex.htmlpage.c) Provide the command used to stop the container.
Lab Finish Command: [student@workstation ~]$ lab finish persisting-mounting
Note: Follow each step carefully and provide the required information or commands as instructed.