summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-03-17 01:18:58 +0100
committerCarl Hetherington <cth@carlh.net>2020-03-17 01:18:58 +0100
commit4f31e45611e6d147257d798664610d2c0be6fa35 (patch)
tree5746b4473a8477c85b4e6bf2241a3427ad3316e0
parent63ef2b5a0e7201b61aab91b9871d3463796159b5 (diff)
Make docker sessions interactive so that the 'shell' command works.
-rwxr-xr-xcdist2
1 files changed, 1 insertions, 1 deletions
diff --git a/cdist b/cdist
index 0a13bff..4c21cef 100755
--- a/cdist
+++ b/cdist
@@ -553,7 +553,7 @@ class DockerTarget(Target):
def command(self, cmd):
dir = os.path.join(self.directory, os.path.relpath(os.getcwd(), self.directory))
- command('%s exec %s -t %s /bin/bash -c \'export %s; cd %s; %s\'' % (config.docker(), self._user_tag(), self.container, self.variables_string(), dir, cmd))
+ command('%s exec %s -i -t %s /bin/bash -c \'export %s; cd %s; %s\'' % (config.docker(), self._user_tag(), self.container, self.variables_string(), dir, cmd))
def cleanup(self):
super(DockerTarget, self).cleanup()