报错信息如下
[root@CHEN ~]# docker run -p 3307:3306 --name mysql8.0 -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: netavark: unable to append rule '-d 10.88.0.0/16 -j ACCEPT' to table 'nat': code: 4, msg: iptables v1.8.8 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain NETAVARK-1D8721804F16F
原因: iptable版本不同导致,切换回原来的iptable版本即可。操作方案如下:
# 安装epel
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-9.noarch.rpm
# 安装iptables-legacy
yum install iptables-legacy
# 更新iptables-legacy
update-alternatives --set iptables /usr/sbin/iptables-legacy
# 检查设置
update-alternatives --config iptables
标签:iptables,epel,--,legacy,linux,oracle,docker,安装
From: https://www.cnblogs.com/chenzechao/p/18073018