Skip to content

Commit 75c7931

Browse files
committed
Added validation for volumes parameter - Issue #276
1 parent 6987326 commit 75c7931

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docker/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ def create_container(self, image, command=None, hostname=None, user=None,
500500
cpu_shares=None, working_dir=None, domainname=None,
501501
memswap_limit=0):
502502

503+
if isinstance(volumes, (str, unicode)):
504+
volumes = [volumes, ]
505+
503506
config = self._container_config(
504507
image, command, hostname, user, detach, stdin_open, tty, mem_limit,
505508
ports, environment, dns, volumes, volumes_from, network_disabled,

0 commit comments

Comments
 (0)