问题
问题发生在集成Gitlab CI/CD 时,Gitlab 和Runner 均运行在Docker中,向Gitlab注册 Runner时,出现此异常信息。
WARNING: IPv4 forwarding is disabled. Networking will not work.
解决
[root@kapana docker-compose]# vim /etc/sysctl.conf
net.ipv4.ip_forward=1
[root@kapana docker-compose]# systemctl restart network
校验
[root@kapana docker-compose]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1