diff --git a/docker/client.py b/docker/client.py index 274359bf..7bdb464a 100644 --- a/docker/client.py +++ b/docker/client.py @@ -521,7 +521,7 @@ class Client(requests.Session): return self.exec_start(create_res, detach, tty, stream) def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False, - user=None, privileged=False): + privileged=False, user=None): if utils.compare_version('1.15', self._version) < 0: raise errors.InvalidVersion('Exec is not supported in API < 1.15') if privileged and utils.compare_version('1.19', self._version) < 0: diff --git a/docs/api.md b/docs/api.md index 4b641471..9f580a07 100644 --- a/docs/api.md +++ b/docs/api.md @@ -282,6 +282,7 @@ Sets up an exec instance in a running container. * stdout (bool): Attach to stdout of the exec command if true. Default: True * stderr (bool): Attach to stderr of the exec command if true. Default: True * tty (bool): Allocate a pseudo-TTY. Default: False +* user (str): User to execute command as. Default: root **Returns** (dict): A dictionary with an exec 'Id' key.