Add a warning for unsupported secret fields.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-01-05 15:00:33 -05:00
parent 4053adc7d3
commit 0d609b68ac
1 changed files with 6 additions and 0 deletions

View File

@ -575,6 +575,12 @@ def get_secrets(service, service_secrets, secret_defs):
"docker-compose.".format(service=service, secret=secret.source))
continue
if secret.uid or secret.gid or secret.mode:
log.warn("Service \"{service}\" uses secret \"{secret}\" with uid, "
"gid, or mode. These fields are not supported by this "
"implementation of the Compose file".format(
service=service, secret=secret.source))
secrets.append({'secret': secret, 'file': secret_def.get('file')})
return secrets