可以在容器run的时候加参数 --restart=always如果容器已经在运行了,那怎么加这个参数呢 docker container update --restart=always 容器名字 可以重启一下docker测试一下 systemctl restart docker