From 8fbe06b8cbd8e3bc425d83130d562eb0c19f309b Mon Sep 17 00:00:00 2001 From: "wuhua.ck" Date: Thu, 15 Apr 2021 22:36:50 +0800 Subject: add flag "--pidfile" for podman create/run Signed-off-by: chenkang --- docs/source/markdown/podman-create.1.md | 7 +++++++ docs/source/markdown/podman-run.1.md | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index ae6dfe03b..08b1db9ba 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -1224,6 +1224,13 @@ The default working directory for running binaries within a container is the roo The image developer can set a different default with the WORKDIR instruction. The operator can override the working directory by using the **-w** option. +#### **\-\-pidfile**=*path* + +Write the pid of the container process to a file. + +The default pidfile is RunDir/pidfile. + + ## EXAMPLES ### Create a container using a local image diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 40b271828..1fa6ede06 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -1305,6 +1305,12 @@ The default working directory for running binaries within a container is the roo The image developer can set a different default with the WORKDIR instruction. The operator can override the working directory by using the **-w** option. +#### **\-\-pidfile**=*path* + +Write the pid of the container process to a file. + +The default pidfile is RunDir/pidfile. + ## Exit Status The exit code from **podman run** gives information about why the container -- cgit v1.2.3-54-g00ecf From 80c1dd0651ac7f70f09c1a5259a17f5cef59ab13 Mon Sep 17 00:00:00 2001 From: chenkang Date: Fri, 16 Apr 2021 23:45:10 +0800 Subject: Modify according to comments Signed-off-by: chenkang --- docs/source/markdown/podman-create.1.md | 11 +++++++++-- docs/source/markdown/podman-run.1.md | 12 ++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index 08b1db9ba..1ac5a3951 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -149,6 +149,7 @@ Write the container ID to the file #### **\-\-conmon-pidfile**=*path* Write the pid of the `conmon` process to a file. `conmon` runs in a separate process than Podman, so this is necessary when using systemd to restart Podman containers. +(This option is not available with the remote Podman client) #### **\-\-cpu-period**=*limit* @@ -1226,9 +1227,15 @@ can override the working directory by using the **-w** option. #### **\-\-pidfile**=*path* -Write the pid of the container process to a file. +When the pidfile location is specified, the container process' PID will be written to the pidfile. (This option is not available with the remote Podman client) +After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: -The default pidfile is RunDir/pidfile. + $ podman inspect --format '{{ .Config.CreateCommand }}' $CID + podman run --pidfile $pidfilepath image + +If the pidfile option is not specified, the container process' PID will be written to +/run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. +The default pidfile location is not listed in the `podman inspect` output. ## EXAMPLES diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 1fa6ede06..5285d9608 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -167,6 +167,7 @@ Write the container ID to *file*. #### **\-\-conmon-pidfile**=*file* Write the pid of the **conmon** process to a file. As **conmon** runs in a separate process than Podman, this is necessary when using systemd to restart Podman containers. +(This option is not available with the remote Podman client) #### **\-\-cpu-period**=*limit* @@ -1307,9 +1308,16 @@ can override the working directory by using the **-w** option. #### **\-\-pidfile**=*path* -Write the pid of the container process to a file. +When the pidfile location is specified, the container process' PID will be written to the pidfile. (This option is not available with the remote Podman client) +After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: + + $ podman inspect --format '{{ .Config.CreateCommand }}' $CID + podman run --pidfile $pidfilepath image + +If the pidfile option is not specified, the container process' PID will be written to +/run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. +The default pidfile location is not listed in the `podman inspect` output. -The default pidfile is RunDir/pidfile. ## Exit Status -- cgit v1.2.3-54-g00ecf From 022bf589c8ee23783721038f7b9e536ac489add7 Mon Sep 17 00:00:00 2001 From: chenkang Date: Sat, 17 Apr 2021 21:25:11 +0800 Subject: improve document Signed-off-by: chenkang --- docs/source/markdown/podman-create.1.md | 10 ++++------ docs/source/markdown/podman-run.1.md | 11 ++++------- 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'docs') diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index 1ac5a3951..db9ff937b 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -1228,14 +1228,12 @@ can override the working directory by using the **-w** option. #### **\-\-pidfile**=*path* When the pidfile location is specified, the container process' PID will be written to the pidfile. (This option is not available with the remote Podman client) -After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: +If the pidfile option is not specified, the container process' PID will be written to /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. - $ podman inspect --format '{{ .Config.CreateCommand }}' $CID - podman run --pidfile $pidfilepath image +After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: -If the pidfile option is not specified, the container process' PID will be written to -/run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. -The default pidfile location is not listed in the `podman inspect` output. + $ podman inspect --format '{{ .PidFile }}' $CID + /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile ## EXAMPLES diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 5285d9608..f84a5913c 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -1309,15 +1309,12 @@ can override the working directory by using the **-w** option. #### **\-\-pidfile**=*path* When the pidfile location is specified, the container process' PID will be written to the pidfile. (This option is not available with the remote Podman client) -After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: - - $ podman inspect --format '{{ .Config.CreateCommand }}' $CID - podman run --pidfile $pidfilepath image +If the pidfile option is not specified, the container process' PID will be written to /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. -If the pidfile option is not specified, the container process' PID will be written to -/run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile. -The default pidfile location is not listed in the `podman inspect` output. +After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command: + $ podman inspect --format '{{ .PidFile }}' $CID + /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile ## Exit Status -- cgit v1.2.3-54-g00ecf