From 26eccbf5d1e04fd98ccf672432bdec50bdeb402f Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Mon, 3 Mar 2025 18:59:08 -0600 Subject: [PATCH] notes update --- src/solutions/container-management.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/solutions/container-management.md b/src/solutions/container-management.md index 8c63eb4..2ed37f5 100644 --- a/src/solutions/container-management.md +++ b/src/solutions/container-management.md @@ -28,35 +28,41 @@ From Practice Scenarios v1, Scenario 4: ### Solution Steps 1. Pull the nginx container image ```bash - # To be filled with my solution + podman pull nginx:latest ``` - [My explanation will go here after completing the exercise] + This command pulls the latest nginx container image from the registry.access.redhat.com registry. 2. Create and configure the persistent volume ```bash - # To be filled with my solution + podman volume create webdata ``` - [My explanation will go here after completing the exercise] + This command creates a persistent volume named webdata. 3. Run the container with the volume mounted ```bash - # To be filled with my solution + podman run -d --name web-server -v webdata:/usr/share/nginx/html -p 8080:80 nginx:latest ``` - [My explanation will go here after completing the exercise] + This command runs the nginx container with the webdata volume mounted at /usr/share/nginx/html and exposes it on port 8080. 4. Configure automatic startup ```bash - # To be filled with my solution + podman generate systemd --new --name web-server + mv web-server.service ~/.config/systemd/user/ + systemctl --user enable web-server + systemctl --user start web-server ``` - [My explanation will go here after completing the exercise] + This command generates a systemd service file for the web-server container. ### Verification ```bash -# To be filled with my verification steps +podman ps ``` +This command lists all running containers. ### Key Learnings -- [To be filled after completing the exercise] +- Podman configuration for container management and persistence +- Systemd service configuration for container auto-start +- Container networking and port mapping ## Skills Demonstrated - Container Management