FREEIPA__docker服务及宿主机开启IPV6

IPv6 stack is enabled in the kernel but there is no interface that has ::1 address assigned. Add ::1 address resolution to ‘lo’ interface. You might need to enable IPv6 on the interface ‘lo’ in sysctl.conf.

使用docker run生成容器时报出错误

docker run --name freeipa-server --privileged=true -p 80:80 -p 389:389 -p 443:443 -ti -h freeipa.bhfae.local -v /sys/fs/cgroup:/sys/fs/cgroup:ro --tmpfs /run --tmpfs /tmp -v /data/freeipa:/data:Z --restart=on-failure:3 freeipa/freeipa-server --no-ntp 

IPv6 stack is enabled in the kernel but there is no interface that has ::1 address assigned. Add ::1 address resolution to 'lo' interface. You might need to enable IPv6 on the interface 'lo' in sysctl.conf.
  1. 通过报错信息判断是宿主机需要开启IPV6配置
  2. 宿主机通过/etc/sysctl.conf配置文件添加下面的配置后 通过sysctl -p命令 使内核参数生效,但容器生成依旧报错
  3. 思索应该是freeipa的配置文件中监听了ipv6地址,宿主机系统层面已经开启了ipv6,但是docker服务自身应该也有ipv6的配置,需要添加配置,在/etc/docker/daemon.json中添加了ipv6配置 并重启dokcer服务后,容器正常启动了
[root@freeipa ~]# sysctl -p 
vm.swappiness = 80
net.ipv4.ip_forward = 1
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

[root@freeipa ~]# cat /etc/docker/daemon.json
{
  "registry-mirrors":["https://b9pmyelo.mirror.aliyuncs.com"],
  "ipv6": true,
  "fixed-cidr-v6": "fc00:17:1:1::/64"
}
[root@freeipa ~]#systemctl restart docker
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页