podman用户配置
podman普通用户创建容器
先关闭防火墙和selinux
[root@localhost ~]# systemctl disable enable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
关闭selinux
[root@localhost ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
重启系统让selinux生效
[root@localhost ~]# reboot
下载 crun包
[root@localhost ~]# yum -y install crun
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:38:28 ago on Wed Dec 15 21:16:41 2021.
Dependencies resolved.
====================================================
Package
Arch Version Repo Size
====================================================
Installing:
crun x86_64 1.0-1.module_el8.5.0+911+f19012f9
AppStream 193 k
Installing dependencies:
yajl x86_64 2.1.0-10.el8 AppStream 41 k
Transaction Summary
====================================================
Install 2 Packages
Total download size: 234 k
Installed size: 569 k
Downloading Packages:
(1/2): yajl-2.1.0-1 42 kB/s | 41 kB 00:00
(2/2): crun-1.0-1.m 195 kB/s | 193 kB 00:00
----------------------------------------------------
Total 235 kB/s | 234 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : yajl-2.1.0-10.el8.x86_64 1/2
Installing : crun-1.0-1.module_el8.5. 2/2
Running scriptlet: crun-1.0-1.module_el8.5. 2/2
Verifying : crun-1.0-1.module_el8.5. 1/2
Verifying : yajl-2.1.0-10.el8.x86_64 2/2
Installed:
crun-1.0-1.module_el8.5.0+911+f19012f9.x86_64
yajl-2.1.0-10.el8.x86_64
Complete!
修改配置文件
[root@localhost ~]# vim /usr/share/containers/containers.conf
.....
# Default OCI runtime
#
runtime = "crun" #取消注释
#runtime = "runc" #