From c3f92cca210db1f7042bfce1ff90645255f0b49e Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Thu, 12 Mar 2015 12:55:14 +0100 Subject: [PATCH] docker: Use a list instead of a dict for volumes according to the docker-py docs. Do not add host-binds to volumes list. --- cloud/docker/docker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/docker/docker.py b/cloud/docker/docker.py index 6e571a7ba5d..fcc14b5a5e0 100644 --- a/cloud/docker/docker.py +++ b/cloud/docker/docker.py @@ -474,13 +474,13 @@ class DockerManager(object): self.volumes = None if self.module.params.get('volumes'): self.binds = {} - self.volumes = {} + self.volumes = [] vols = self.module.params.get('volumes') for vol in vols: parts = vol.split(":") # regular volume if len(parts) == 1: - self.volumes[parts[0]] = {} + self.volumes.append(parts[0]) # host mount (e.g. /mnt:/tmp, bind mounts host's /tmp to /mnt in the container) elif 2 <= len(parts) <= 3: # default to read-write