【问题标题】:podman CentOS 8 not starting container as non-root userpodman CentOS 8 未以非 root 用户身份启动容器
【发布时间】:2020-05-16 15:00:13
【问题描述】:

我试图在 CentOS 8 服务器上以非 root 用户身份启动 busybox 容器,但它给出了以下消息。

以非 root 用户身份启动容器的正确方法是什么?

  podman run -it --name busy  docker.io/library/busybox sh
Trying to pull docker.io/library/busybox...Getting image source signatures
Copying blob bdbbaa22dec6 done
Copying config 6d5fcfe5ff done
Writing manifest to image destination
Storing signatures
ERRO[0003] Error pulling image ref //busybox:latest: Error committing the finished image: error adding layer with blob "sha256:bdbbaa22dec6b7fe23106d2c1b1f43d9598cd8fc33706cc27c1d938ecd5bffc7": Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 65534:65534 for /home): lchown /home: invalid argument
Failed
Error: unable to pull docker.io/library/busybox: unable to pull image: Error committing the finished image: error adding layer with blob "sha256:bdbbaa22dec6b7fe23106d2c1b1f43d9598cd8fc33706cc27c1d938ecd5bffc7": Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 65534:65534 for /home): lchown /home: invalid argument

【问题讨论】:

    标签: centos8 podman


    【解决方案1】:

    是的,您运行的命令是正确的。在我的 Fedora 31 系统上它工作得很好。

    [testuser@fedora31 ~]$ podman run -it --name busy docker.io/library/busybox sh
    Trying to pull docker.io/library/busybox...
    Getting image source signatures
    Copying blob bdbbaa22dec6 done  
    Copying config 6d5fcfe5ff done  
    Writing manifest to image destination
    Storing signatures
    / # exit
    [testuser@fedora31 ~]$ podman --version
    podman version 1.8.0
    [testuser@fedora31 ~]$ 
    

    标志--rm 也经常有用。

    您得到的错误似乎与 UID 映射有关。

    以下是有关运行“无根”podman 的一些信息:

    https://github.com/containers/libpod/blob/master/docs/tutorials/rootless_tutorial.md

    还有什么有趣的:

    不适用于 NFS 或并行文件系统主目录

    引用自

    https://github.com/containers/libpod/blob/master/rootless.md

    【讨论】:

    • 感谢您的指点,我的 UID 问题。不是podman 已准备好生产。
    猜你喜欢
    • 2018-04-09
    • 2015-04-29
    • 2019-04-05
    • 2020-12-19
    • 2015-06-18
    • 2018-06-18
    • 2018-07-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多