diff --git a/src/rhcsa.md b/src/rhcsa.md index 2014c4e..28a4ecf 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -942,4 +942,26 @@ touch /.autorelabel exec /usr/lib/systemd/systemd ### the system may take a while to boot +``` + +## Manage Containers on RHEL + +### podman +```bash +sudo dnf install podman # Install podman + +podman pull nginx:latest # Pull the latest nginx image +podman images # Display the images + +podman run --name mynginx -d -p 8080:80 nginx:latest # Run the nginx container + +podman ps # Display the running containers +podman logs mynginx # Display the logs of the mynginx container +podman exec -it mynginx bash # Execute a command in the mynginx container + +podman stop mynginx # Stop the mynginx container +podman start mynginx # Start the mynginx container +podman rm mynginx # Remove the mynginx container + +podman rmi nginx:latest # Remove the nginx image ``` \ No newline at end of file