17.7. Running Podman with extended privileges


If you cannot run your workloads in a rootless environment, you need to run these workloads as a root user. Running a container with extended privileges should be done judiciously, because it disables all security features.

Prerequisites

  • The container-tools meta-package is installed.

Procedure

  • Run the Podman container in the Podman container:

    $ podman run --privileged --name=privileged_podman \
      registry.access.redhat.com//podman podman run ubi10 echo hello
    Resolved "ubi10" as an alias (/etc/containers/registries.conf.d/001-rhel-shortnames.conf)
    Trying to pull registry.access.redhat.com/ubi10:latest...
    ...
    Storing signatures
    hello
  • Run the outer container named privileged_podman based on the registry.access.redhat.com/ubi10/podman image.
  • The --privileged option disables the security features that isolate the container from the host.
  • Run podman run ubi10 echo hello command to create the inner container based on the ubi10 image.
  • Notice that the ubi10 short image name was resolved as an alias. As a result, the registry.access.redhat.com/ubi10:latest image is pulled.

Verification

  • List all containers:

    $ podman ps -a
    CONTAINER ID  IMAGE                            COMMAND               CREATED            STATUS                          PORTS   NAMES
    52537876caf4  registry.access.redhat.com/ubi10/podman               podman run ubi10 e...  30 seconds ago     Exited (0) 13 seconds ago               privileged_podman

    For more information, see the podman-run(1) man page on your system.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部