From dd732ad2691c4ffb04506024f991a8cbb5b8034b Mon Sep 17 00:00:00 2001 From: Sergey Tsaplin Date: Sat, 1 Jun 2019 07:39:34 +0300 Subject: Add WorkingDir container's option support (#175) --- src/builder.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/builder.rs b/src/builder.rs index 8cbbf9b..58bca53 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -564,6 +564,15 @@ impl ContainerOptionsBuilder { self } + /// Specify the working dir (corresponds to the `-w` docker cli argument) + pub fn working_dir( + &mut self, + working_dir: &str, + ) -> &mut Self { + self.params.insert("WorkingDir", json!(working_dir)); + self + } + /// Specify any bind mounts, taking the form of `/some/host/path:/some/container/path` pub fn volumes( &mut self, -- cgit v1.2.3