From ecec94ee7e25ff0e05a00b734664b5f85acf2f98 Mon Sep 17 00:00:00 2001 From: RongZhang Date: Wed, 7 Mar 2018 04:36:39 -0600 Subject: [PATCH] Fix Docker exits prematurely details:https://github.com/moby/moby/pull/31490/files --- roles/docker/templates/docker.service.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/docker/templates/docker.service.j2 b/roles/docker/templates/docker.service.j2 index 29abb6d53..d8efe2025 100644 --- a/roles/docker/templates/docker.service.j2 +++ b/roles/docker/templates/docker.service.j2 @@ -31,7 +31,10 @@ LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity TimeoutStartSec=1min -Restart=on-abnormal +# restart the docker process if it exits prematurely +Restart=on-failure +StartLimitBurst=3 +StartLimitInterval=60s [Install] WantedBy=multi-user.target