explicit the restartPolicy on the dockershim

This change explicits the restart policy, as on some docker version
(e.g. 11.07-ce) the default for this field is "". which seems to be not
respected by dockerd
pull/564/head
Yassine TIJANI 2019-03-04 22:59:31 +01:00
parent 79e8a29544
commit 5f7c60859c
1 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,9 @@ func (ds *dockerService) CreateContainer(_ context.Context, r *runtimeapi.Create
},
HostConfig: &dockercontainer.HostConfig{
Binds: generateMountBindings(config.GetMounts()),
RestartPolicy: dockercontainer.RestartPolicy{
Name: "no",
},
},
}