diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/podman.1.md | 16 | ||||
-rw-r--r-- | docs/tutorials/podman_tutorial.md | 12 |
2 files changed, 17 insertions, 11 deletions
diff --git a/docs/podman.1.md b/docs/podman.1.md index b808a7fa5..11dd50cb6 100644 --- a/docs/podman.1.md +++ b/docs/podman.1.md @@ -182,13 +182,17 @@ the exit codes follow the `chroot` standard, see below: ## FILES -**libpod.conf** (`/etc/containers/libpod.conf`) +**libpod.conf** (`/usr/share/containers/libpod.conf`) - libpod.conf is the configuration file for all tools using libpod to manage containers. When Podman runs in rootless mode, then the file `$HOME/.config/containers/libpod.conf` is used. + libpod.conf is the configuration file for all tools using libpod to manage containers, when run as root. Administrators can override the defaults file by creating `/etc/containers/libpod.conf`. When Podman runs in rootless mode, the file `$HOME/.config/containers/libpod.conf` is created and replaces some fields in the system configuration file. -**mounts.conf** (`/usr/share/containers/mounts.conf` and optionally `/etc/containers/mounts.conf`) + Podman uses builtin defaults if no libpod.conf file is found. - The mounts.conf file specifies volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. When Podman runs in rootless mode, the file `$HOME/.config/containers/mounts.conf` is also used. Please refer to containers-mounts.conf(5) for further details. +**mounts.conf** (`/usr/share/containers/mounts.conf`) + + The mounts.conf file specifies volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. Administrators can override the defaults file by creating `/etc/containers/mounts.conf`. + +When Podman runs in rootless mode, the file `$HOME/.config/containers/mounts.conf` will override the default if it exists. Please refer to containers-mounts.conf(5) for further details. **policy.json** (`/etc/containers/policy.json`) @@ -198,7 +202,7 @@ the exit codes follow the `chroot` standard, see below: registries.conf is the configuration file which specifies which container registries should be consulted when completing image names which do not include a registry or domain portion. - When Podman runs in rootless mode, the file `$HOME/.config/containers/registries.conf` is used. + Non root users of Podman can create the `$HOME/.config/containers/registries.conf` file to be used instead of the system defaults. **storage.conf** (`/etc/containers/storage.conf`) @@ -206,7 +210,7 @@ the exit codes follow the `chroot` standard, see below: The storage configuration file specifies all of the available container storage options for tools using shared container storage. - When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is also loaded. + When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is used instead of the system defaults. ## Rootless mode Podman can also be used as non-root user. When podman runs in rootless mode, a user namespace is automatically created for the user, defined in /etc/subuid and /etc/subgid. diff --git a/docs/tutorials/podman_tutorial.md b/docs/tutorials/podman_tutorial.md index bfff90016..2abd9c50f 100644 --- a/docs/tutorials/podman_tutorial.md +++ b/docs/tutorials/podman_tutorial.md @@ -123,13 +123,14 @@ sudo make install PREFIX=/usr This sample container will run a very basic httpd server that serves only its index page. ```console -podman run -dt -e HTTPD_VAR_RUN=/var/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ +podman run -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/var/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \ -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ registry.fedoraproject.org/f27/httpd /usr/bin/run-httpd ``` 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. +will print the container ID after it has run. Note that we use port forwarding to be able to +access the HTTP server. For successful running at least slirp4netns v0.3.0 is needed. ### Listing running containers The Podman *ps* command is used to list creating and running containers. @@ -140,10 +141,11 @@ podman ps Note: If you add *-a* to the *ps* command, Podman will show all containers. ### Inspecting a running container You can "inspect" a running container for metadata and details about itself. We can even use -the inspect subcommand to see what IP address was assigned to the container. +the inspect subcommand to see what IP address was assigned to the container. As the container is running in rootless mode, an IP address is not assigned and the value will be listed as "none" in the output from inspect. ```console -$ sudo podman inspect -l | grep IPAddress\": - "IPAddress": "10.88.6.140", +$ podman inspect -l | grep IPAddress\": + "SecondaryIPAddresses": null, + "IPAddress": "", ``` Note: The -l is a convenience argument for **latest container**. You can also use the container's ID instead |