docker 运行 时主机重启
Host reboot while docker running
我的 Ubuntu OS 上有一个 ROS 系统,它在 Docker 中运行。我在 docker 仍然是 运行 时重新启动了系统。
之后 ROS 停止工作。
突然重启是否会导致此问题?
更新:
1. 没有 ros 相关命令显示任何输出(它只是一个空行)
2. 我已经在主机OS上单独安装了ROS并尝试了roscore,它工作正常。我能够看到 rostopic 列表的输出。
3. 我已重新安装 OS,但问题仍然存在 docker。
有什么建议吗?
谢谢。
快速回答:
您可以使用 unless-stopped
或 always
选项。
$ docker run --restart unless-stopped ros
unless-stopped
--> Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted.
always
--> Always restart the container if it stops.
我的 Ubuntu OS 上有一个 ROS 系统,它在 Docker 中运行。我在 docker 仍然是 运行 时重新启动了系统。 之后 ROS 停止工作。 突然重启是否会导致此问题?
更新: 1. 没有 ros 相关命令显示任何输出(它只是一个空行) 2. 我已经在主机OS上单独安装了ROS并尝试了roscore,它工作正常。我能够看到 rostopic 列表的输出。 3. 我已重新安装 OS,但问题仍然存在 docker。
有什么建议吗?
谢谢。
快速回答:
您可以使用 unless-stopped
或 always
选项。
$ docker run --restart unless-stopped ros
unless-stopped
--> Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted.
always
--> Always restart the container if it stops.