如何在CoreOS重启后自动重新启动Docker容器? [英] How to auto restart a Docker container after a reboot in CoreOS?

查看:475
本文介绍了如何在CoreOS重启后自动重新启动Docker容器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设在重新启动操作系统时,通过任何init.d或系统类似进程自动重启Docker守护程序,重新启动一个或多个Docker容器的首选方法是什么?例如,我可能在反向代理或数据库服务器后面有一些Web服务器。

解决方案

CoreOS使用systemd来管理长运行服务:




Assuming the Docker daemon is restarted automatically by whatever init.d or systemd like process when the OS is restarted, what is the preferred way to restart one or more Docker containers? For example I might have a number of web servers behind a reverse proxy or a database server.

解决方案

CoreOS uses systemd to manage long running services:

这篇关于如何在CoreOS重启后自动重新启动Docker容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆