不同用户下执行
podman ps
,只能查看当前用户的运行容器(即使是root用户,也不能查看其他普通用户启用的容器信息)
command
overview
1 | check disk usage |
image
1 | load tar file to image |
prune
1 | remove unused containers (stopped containers) |
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: creating events dirs: mkdir /run/user/1001: permission denied
1 | edit ~/.bashrc or ~/.zshrc |
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
Error: unable to start container “xxx”: crun: setrlimit RLIMIT_NOFILE
: Operation not permitted: OCI permission denied
same with above
panic: runtime error: invalid memory address or nil pointer dereference
issue
execute ‘podman system migrate’ occur issue
1
2
3stopped 70802e06e7ae92ef5ac6cf2e90655988949f74799c088afe3589b2031e2371f7
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x564e3393c85b]solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17check
echo $XDG_RUNTIME_DIR
If empty, set it: export XDG_RUNTIME_DIR=/run/user/$(id -u)
Make sure user linger is enabled
loginctl enable-linger $USER
Restart systemd user services
systemctl --user daemon-reexec
systemctl --user restart podman
Clean up rootless storage/socket
rm -rf $XDG_RUNTIME_DIR/podman
rm -rf $XDG_RUNTIME_DIR/libpod
If still stuck, consider resetting container storage:
podman --log-level=debug system reset