mirror of https://github.com/docker/compose.git
Fix secret location with absolute paths
Signed-off-by: Andrea Giardini <contact@andreagiardini.com>
This commit is contained in:
parent
8c38651196
commit
18df4915f2
|
@ -881,6 +881,9 @@ class Service(object):
|
||||||
|
|
||||||
def get_secret_volumes(self):
|
def get_secret_volumes(self):
|
||||||
def build_spec(secret):
|
def build_spec(secret):
|
||||||
|
if secret['secret'].target is not None and secret['secret'].target.startswith('/'):
|
||||||
|
target = secret['secret'].target
|
||||||
|
else:
|
||||||
target = '{}/{}'.format(
|
target = '{}/{}'.format(
|
||||||
const.SECRETS_PATH,
|
const.SECRETS_PATH,
|
||||||
secret['secret'].target or secret['secret'].source)
|
secret['secret'].target or secret['secret'].source)
|
||||||
|
|
Loading…
Reference in New Issue