binds dict if not specified should remain to none otherwise docker-py will try to create a new host config and all volume and ports binds are lost. config should be done at the creation of the container not when we start it

This commit is contained in:
Jean Praloran 2015-06-04 14:20:10 +12:00
parent 3ca35d1ec3
commit a0fed313fa

View File

@ -873,11 +873,9 @@ def start(container,
salt '*' docker.start <container id>
'''
if not binds:
binds = {}
if not isinstance(binds, dict):
raise SaltInvocationError('binds must be formatted as a dictionary')
if binds:
if not isinstance(binds, dict):
raise SaltInvocationError('binds must be formatted as a dictionary')
client = _get_client()
status = base_status.copy()