不同用户下执行
podman ps
,只能查看当前用户的运行容器(即使是root用户,也不能查看其他普通用户启用的容器信息)
command
image
1 | load tar file to image |
best practices
change default data dir
rootful mode
Default graphroot: /var/lib/containers/storage.
1 | check |
rootless mode
Default graphroot: ~/.local/share/containers/storage.
1 | check |
troubleshooting
potentially insufficient UIDs or GIDs available in user namespace
If the requested UID/GID still falls outside or Podman needs more mappings, you can edit /etc/subuid and /etc/subgid (as root) to increase the range
1 | Increase UID/GID Range (Optional): |
error while loading shared libraries
when execute ‘podman run -it –entrypoint bash xxx’, occur ‘bash: error while loading shared libraries: /usr/lib64/libc.so.6: cannot apply additional memory protection after relocation: Permission denied’
1 | sudo setenforce 0 |
ulimit: open files: cannot modify limit: Operation not permitted
use regular use could not operate ulimit command
Set ulimit when starting the container
1
podman run -it --ulimit nofile=1048576:1048576 your_image
Adjust host user limits (Edit
/etc/security/limits.conf
as root)1
2your_username soft nofile 1048576
your_username hard nofile 1048576