We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker 提供了 restart policy 机制(重启策略),可以在容器或者 Docker 重启时控制器能够自启动。这种重启策略可以保证相关容器按照正确顺序启动。Docker 建议使用重启策略,并避免使用流程管理器启动容器。
Docker
重启策略跟 dockerd 命令的 --live-restore 标志不同。使用 --live-restore 标志可以在 Docker 升级的时候保证容器继续运行,但是网络以及用户终端输入会被终端。
dockerd
--live-restore
要为容器配置重启策略,使用 docker run 命令的时候添加 --restart 标志。--restart 标志有多个 value 可选
docker run
--restart
value
restart
swarm 服务
The text was updated successfully, but these errors were encountered:
No branches or pull requests
restart policy (重启策略)
Docker
提供了 restart policy 机制(重启策略),可以在容器或者Docker
重启时控制器能够自启动。这种重启策略可以保证相关容器按照正确顺序启动。Docker
建议使用重启策略,并避免使用流程管理器启动容器。重启策略跟
dockerd
命令的--live-restore
标志不同。使用--live-restore
标志可以在Docker
升级的时候保证容器继续运行,但是网络以及用户终端输入会被终端。使用重启策略
要为容器配置重启策略,使用
docker run
命令的时候添加--restart
标志。--restart
标志有多个value
可选重启策略详情
Docker
已经开始监控它。这可以避免没有成功启动的容器陷入restart
的死循环。Docker
守护进程重启或手动重启,这是为了避免重启循环的另一次尝试。swarm 服务
的重启策略有不同的配置。The text was updated successfully, but these errors were encountered: