Merge pull request #822 from balena-io/issue-821

compose: Change default stop signal from '' to SIGTERM
This commit is contained in:
Shaun Mulligan 2018-11-27 12:38:50 -08:00 committed by GitHub
commit 6e05f1288e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -349,7 +349,7 @@ export class Service {
pidsLimit: 0,
securityOpt: [],
stopGracePeriod,
stopSignal: '',
stopSignal: 'SIGTERM',
sysctls: {},
tmpfs,
usernsMode: '',
@ -492,7 +492,7 @@ export class Service {
tmpfs,
extraHosts: container.HostConfig.ExtraHosts || [],
ulimits,
stopSignal: (container.Config as any).StopSignal || '',
stopSignal: (container.Config as any).StopSignal || 'SIGTERM',
stopGracePeriod: (container.Config as any).StopTimeout || 10,
healthcheck: ComposeUtils.dockerHealthcheckToServiceHealthcheck(
(container.Config as any).Healthcheck || {},

View File

@ -159,7 +159,7 @@ export function getStopSignal(
}
return composeStop;
}
return _.get(imageInfo, 'Config.StopSignal', '');
return _.get(imageInfo, 'Config.StopSignal', 'SIGTERM');
}
// TODO: Move healthcheck stuff into seperate module