Docker containers not starting on boot with Portainer - Over 2 weeks of debugging, have a workaround, looking for proper fix
Issue - After every reboot, docker ps is empty. Running systemctl restart docker immediately brings everything back.
Stuff I tried -- Changing boot order of services, waiting.. Nothing seem to work.
I have no idea whats supposed to be the right way... I have now disabled apps entirerly, and modifyed the docker systemd to pass everything via command args itself.
Whats the workaround I have now
Workaround (what I'm running now):
Put all Docker config in systemd override (since TrueNAS wipes daemon.json):
/etc/systemd/system/docker.service.d/override.conf:
[Unit]
StartLimitBurst=1
StartLimitIntervalSec=910
After=ix-netif.service network-online.target local-fs.target ix-zfs.service
Wants=network-online.target
Requires=ix-netif.service
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
--data-root=/mnt/ssd_mirror/docker_apps --exec-opt native.cgroupdriver=cgroupfs --iptables=true --ipv6=true
--fixed-cidr-v6=fdd0::/64 --default-address-pool base=172.17.0.0/12,size=24 --default-address-pool
base=fdd0::/48,size=64
ExecStartPost=/bin/sh -c "iptables -P FORWARD ACCEPT && ip6tables -P FORWARD ACCEPT"
Restart=always
RestartSec=10
TimeoutStartSec=900
TimeoutStartFailureMode=terminate