diff --git a/dockrice/dockerpath.py b/dockrice/dockerpath.py index 747b7f8..6010ed0 100644 --- a/dockrice/dockerpath.py +++ b/dockrice/dockerpath.py @@ -114,6 +114,9 @@ def _get_target_source(self) -> Tuple[pathlib.PurePath]: def get_mount(self) -> Mount: target, source = self._get_target_source() + if not self._read_only: + host_path = pathlib.Path(source) + host_path.mkdir(parents=True, exist_ok=True) return Mount( target, source,