1

我试图在 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
4

1 回答 1

0

是的,您运行的命令是正确的。在我的 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

于 2020-02-24T15:55:57.073 回答