Merge "Add log_tag option to container definition"
This commit is contained in:
commit
f77f7d88ee
|
@ -287,3 +287,6 @@ volumes:
|
|||
|
||||
volumes_from:
|
||||
List of strings. Mount volumes from the specified container(s).
|
||||
|
||||
log_tag:
|
||||
String. Set the log tag for the specified container.
|
||||
|
|
|
@ -173,6 +173,8 @@ class ComposeV1Builder(object):
|
|||
for v in cconfig.get('volumes_from', []):
|
||||
if v:
|
||||
cmd.append('--volumes-from=%s' % v)
|
||||
if 'log_tag' in cconfig:
|
||||
cmd.append('--log-opt=tag=%s' % cconfig['log_tag'])
|
||||
|
||||
cmd.append(cconfig.get('image', ''))
|
||||
cmd.extend(self.command_argument(cconfig.get('command')))
|
||||
|
|
|
@ -324,6 +324,7 @@ three-12345678 three''', '', 0),
|
|||
'retries': 3
|
||||
},
|
||||
'env_file': '/tmp/foo.env',
|
||||
'log_tag': '{{.ImageName}}/{{.Name}}/{{.ID}}'
|
||||
}
|
||||
}
|
||||
builder = compose1.ComposeV1Builder('foo', config, None)
|
||||
|
@ -337,7 +338,7 @@ three-12345678 three''', '', 0),
|
|||
'--health-cmd=/bin/true', '--health-interval=30s',
|
||||
'--health-timeout=10s', '--health-retries=3',
|
||||
'--privileged=true', '--restart=always', '--user=bar',
|
||||
'centos:7'],
|
||||
'--log-opt=tag={{.ImageName}}/{{.Name}}/{{.ID}}', 'centos:7'],
|
||||
cmd
|
||||
)
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
the log_tag option was added to the container definition. This will make
|
||||
paunch add the --log-opt tag=<value> option to the run command.
|
Loading…
Reference in New Issue