add support for stop_signal to compose file
Signed-off-by: Jonathan Stewmon <jstewmon@rmn.com>
This commit is contained in:
parent
d4b4b126fb
commit
5d8c2d3cec
7 changed files with 39 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ DOCKER_CONFIG_KEYS = [
|
|||
'restart',
|
||||
'security_opt',
|
||||
'stdin_open',
|
||||
'stop_signal',
|
||||
'tty',
|
||||
'user',
|
||||
'volume_driver',
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@
|
|||
"restart": {"type": "string"},
|
||||
"security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
||||
"stdin_open": {"type": "boolean"},
|
||||
"stop_signal": {"type": "string"},
|
||||
"tty": {"type": "boolean"},
|
||||
"ulimits": {
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
"restart": {"type": "string"},
|
||||
"security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
||||
"stdin_open": {"type": "boolean"},
|
||||
"stop_signal": {"type": "string"},
|
||||
"tty": {"type": "boolean"},
|
||||
"ulimits": {
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@ class Container(object):
|
|||
def labels(self):
|
||||
return self.get('Config.Labels') or {}
|
||||
|
||||
@property
|
||||
def stop_signal(self):
|
||||
return self.get('Config.StopSignal')
|
||||
|
||||
@property
|
||||
def log_config(self):
|
||||
return self.get('HostConfig.LogConfig') or None
|
||||
|
|
@ -132,6 +136,10 @@ class Container(object):
|
|||
def environment(self):
|
||||
return dict(var.split("=", 1) for var in self.get('Config.Env') or [])
|
||||
|
||||
@property
|
||||
def exit_code(self):
|
||||
return self.get('State.ExitCode')
|
||||
|
||||
@property
|
||||
def is_running(self):
|
||||
return self.get('State.Running')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue