Merge pull request #20931 from baude/issue20916

[CI:DOCS]use nginx in podman tutorial
This commit is contained in:
openshift-merge-bot[bot]
2023-12-08 11:36:00 +00:00
committed by GitHub
2 changed files with 2 additions and 8 deletions

View File

@ -21,10 +21,7 @@ For installing or building Podman, see the [installation instructions](https://p
This sample container will run a very basic httpd server (named basic_httpd) that serves only its index This sample container will run a very basic httpd server (named basic_httpd) that serves only its index
page. page.
```console ```console
podman run --name basic_httpd -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ podman run --name basic_httpd -dt -p 8080:80/tcp docker.io/nginx
-e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
-e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd
``` ```
Because the container is being run in detached mode, represented by the *-d* in the `podman run` command, Podman Because the container is being run in detached mode, represented by the *-d* in the `podman run` command, Podman
will print the container ID after it has run. Note that we use port forwarding to be able to will print the container ID after it has run. Note that we use port forwarding to be able to

View File

@ -23,10 +23,7 @@ Podman是由libpod库提供一个实用的程序可以被用于创建和管
这个示例容器会运行一个简单的只有主页的 httpd 服务器。 这个示例容器会运行一个简单的只有主页的 httpd 服务器。
```console ```console
podman run -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ podman run --name basic_httpd -dt -p 8080:80/tcp docker.io/nginx
-e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
-e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd
``` ```
因为命令中的 *-d* 参数表明容器以 "detached" 模式运行,所以 Podman 会在容器运行后打印容器的 ID。 因为命令中的 *-d* 参数表明容器以 "detached" 模式运行,所以 Podman 会在容器运行后打印容器的 ID。