FAQ
nerdctl: command not found
The containerd environment is not correctly installed or /usr/local/bin is not in PATH.
Fix:
shell
export PATH="/usr/local/bin:$PATH"
echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/profile
source /etc/profile1
2
3
2
3
If still not found, re-run the installation script:
shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)1
containerd service not running
shell
systemctl status containerd
systemctl restart containerd1
2
2
View logs:
shell
journalctl -u containerd -f1
Container cannot access external network (IPv4)
Check if iptables NAT rules exist:
shell
iptables -t nat -L POSTROUTING -n -v | grep 172.201
If not present, add manually:
shell
iptables -t nat -A POSTROUTING -s 172.20.0.0/16 ! -d 172.20.0.0/16 -j MASQUERADE
iptables -A FORWARD -s 172.20.0.0/16 -j ACCEPT
iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT1
2
3
2
3
Container IPv6 not working
- Confirm the host has a public IPv6 address
- Check if the containerd-ipv6 CNI network exists:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist1
- Check if the ndpresponder container is running:
shell
nerdctl ps | grep ndpresponder1
Image pull failed
The script includes built-in CDN detection. You can also manually test CDN availability:
shell
curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 61
How to completely reset the containerd environment
Uninstall, then reinstall:
shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)1
2
2
lxcfs related issues
If lxcfs is not installed on the host, containers will see the host's CPU/memory view. Install lxcfs:
shell
apt-get install -y lxcfs # Debian/Ubuntu
yum install -y lxcfs # CentOS/RHEL1
2
2
Disk limit not working
Disk limits require xfs or btrfs snapshotter support. The default overlay snapshotter does not support container-level disk limits.
For disk limits, refer to the docker or incus solution documentation.
