Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samcli/local/docker/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create(self):
if self.is_created():
raise RuntimeError("This container already exists. Cannot create again.")

LOG.info("Mounting %s as %s:ro inside runtime container", self._host_dir, self._working_dir)
LOG.info("Mounting %s as %s:ro,delegated inside runtime container", self._host_dir, self._working_dir)

kwargs = {
"command": self._cmd,
Expand All @@ -95,7 +95,7 @@ def create(self):
# https://docs.docker.com/storage/bind-mounts
# Mount the host directory as "read only" inside container
"bind": self._working_dir,
"mode": "ro"
"mode": "ro,delegated"
}
},
# We are not running an interactive shell here.
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/local/docker/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_must_create_container_with_required_values(self):
expected_volumes = {
self.host_dir: {
"bind": self.working_dir,
"mode": "ro"
"mode": "ro,delegated"
}
}
generated_id = "fooobar"
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_must_create_container_including_all_optional_values(self):
expected_volumes = {
self.host_dir: {
"bind": self.working_dir,
"mode": "ro"
"mode": "ro,delegated"
},
'/somepath': {"blah": "blah value"}
}
Expand Down Expand Up @@ -167,7 +167,7 @@ def test_must_create_container_translate_volume_path(self, os_mock):
translated_volumes = {
"/c/Users/Username/AppData/Local/Temp/tmp1337": {
"bind": self.working_dir,
"mode": "ro"
"mode": "ro,delegated"
}
}

Expand Down Expand Up @@ -222,7 +222,7 @@ def test_must_connect_to_network_on_create(self):
expected_volumes = {
self.host_dir: {
"bind": self.working_dir,
"mode": "ro"
"mode": "ro,delegated"
}
}

Expand Down Expand Up @@ -264,7 +264,7 @@ def test_must_connect_to_host_network_on_create(self):
expected_volumes = {
self.host_dir: {
"bind": self.working_dir,
"mode": "ro"
"mode": "ro,delegated"
}
}

Expand Down