1. --restart
no 不自动重启容器. (默认value)on-failure 容器发生error而退出(容器退出状态不为0)重启容器,可以指定重启的最大次数,如:on-failure:10
unless-stopped 在容器已经stop掉或Docker stoped/restarted的时候才重启容器
always 在容器已经stop掉或Docker stoped/restarted的时候才重启容器,手动stop的不算
2.修改容器自启方案 docker update --restart no mynginx