Merge pull request #17970 from TomSweeneyRedHat/dev/tsweeney/tutorup1

[CI:DOCS] Improve basic tutorial
This commit is contained in:
OpenShift Merge Robot 2023-04-03 08:18:30 -04:00 committed by GitHub
commit 9ca3dd34f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -46,8 +46,7 @@ podman inspect -l | grep IPAddress\":
"IPAddress": "", "IPAddress": "",
``` ```
Note: The -l is a convenience argument for **latest container**. You can also use the container's ID instead Note: The -l or --latest option is a convenience argument for **latest container**. This option is not available with the remote Podman client; use the container name or ID instead.
of -l.
### Testing the httpd server ### Testing the httpd server
As we do not have the IP address of the container, we can test the network communication between the host As we do not have the IP address of the container, we can test the network communication between the host
@ -60,7 +59,7 @@ curl http://localhost:8080
### Viewing the container's logs ### Viewing the container's logs
You can view the container's logs with Podman as well: You can view the container's logs with Podman as well:
```console ```console
podman logs --latest podman logs <container_id>
10.88.0.1 - - [07/Feb/2018:15:22:11 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-" 10.88.0.1 - - [07/Feb/2018:15:22:11 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-"
10.88.0.1 - - [07/Feb/2018:15:22:30 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-" 10.88.0.1 - - [07/Feb/2018:15:22:30 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-"
10.88.0.1 - - [07/Feb/2018:15:22:30 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-" 10.88.0.1 - - [07/Feb/2018:15:22:30 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.55.1" "-"
@ -126,7 +125,7 @@ curl http://<IP_address>:8080
### Stopping the container ### Stopping the container
To stop the httpd container: To stop the httpd container:
```console ```console
podman stop --latest podman stop <container_id>
``` ```
You can also check the status of one or more containers using the *ps* subcommand. In this case, we should You can also check the status of one or more containers using the *ps* subcommand. In this case, we should
use the *-a* argument to list all containers. use the *-a* argument to list all containers.
@ -137,7 +136,7 @@ podman ps -a
### Removing the container ### Removing the container
To remove the httpd container: To remove the httpd container:
```console ```console
podman rm --latest podman rm <container_id>
``` ```
You can verify the deletion of the container by running *podman ps -a*. You can verify the deletion of the container by running *podman ps -a*.