diff --git a/container/docker/engine.py b/container/docker/engine.py
index <HASH>..<HASH> 100644
--- a/container/docker/engine.py
+++ b/container/docker/engine.py
@@ -522,8 +522,8 @@ class Engine(BaseEngine):
             self.project_name, host, client
         )
         cmd = self.config['services'][host].get('command', '')
-        if isinstance(self.config['services'][host].get('command'), list):
-            cmd = ' '.join(self.config['services'][host]['command'])
+        if isinstance(cmd, list):
+            cmd = json.dumps(cmd)
         image_config = dict(
             USER=self.config['services'][host].get('user', 'root'),
             WORKDIR=self.config['services'][host].get('working_dir', '/'),
Pass command list as JSON

If we want a string with spaces, we can always pass it as a single
string (which will get prefixed with ["/bin/sh", "-c"] by Docker).

Before this patch there's no way to specify the exact command without
the shell prepended.