2024年11月24日星期日 上午1:49:45

修改 Docker 配置,开启容器的 IPv6 功能

8 个月 前
#29792 引用
修改 Docker 配置,开启容器的 IPv6 功能

以下配置会增加一段自定义内网 IPv6 地址,开启容器的 IPv6 功能,以及限制日志文件大小,防止 Docker 日志塞满硬盘 :

cat > /etc/docker/daemon.json << EOF
{
    "log-driver": "json-file",
    "log-opts": {
        "max-size": "20m",
        "max-file": "3"
    },
    "ipv6": true,
    "fixed-cidr-v6": "fd00:dead:beef:c0::/80",
    "experimental":true,
    "ip6tables":true
}
EOF


systemctl restart docker


https://u.sb/debian-install-docker/
0
7 个月 前
#32998 引用
debian 12  + docker rpi p3b+

# systemctl status NetworkManager

● NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-04-16 10:41:32 BST; 9h ago
       Docs: man:NetworkManager(8)
   Main PID: 546 (NetworkManager)
      Tasks: 3 (limit: 765)
        CPU: 14min 25.521s
     CGroup: /system.slice/NetworkManager.service
             └─546 /usr/sbin/NetworkManager --no-daemon

Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.2868] device (docker0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.2895] device (docker0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.2915] device (docker0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.2936] device (docker0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.3084] device (docker0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.3101] device (docker0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 16 10:42:05 raspberrypi NetworkManager[546]: <info>  [1713260525.3148] device (docker0): Activation: successful, device activated.
Apr 16 10:42:32 raspberrypi NetworkManager[546]: <info>  [1713260552.1340] dhcp6 (eth0): activation: beginning transaction (timeout in 45 seconds)
Apr 16 10:42:32 raspberrypi NetworkManager[546]: <info>  [1713260552.1392] policy: set 'Wired connection 1' (eth0) as default for IPv6 routing and DNS
Apr 16 10:42:33 raspberrypi NetworkManager[546]: <info>  [1713260553.2217] dhcp6 (eth0): state changed new lease, address=fd18:f22c:7814:d900::1001


0