Skip to content

Commit

Permalink
Pass all volume mount types through for now until work out what to re…
Browse files Browse the repository at this point in the history
…strict.
  • Loading branch information
GrahamDumpleton committed Nov 17, 2022
1 parent cf87e31 commit 487ed2d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions session-manager/handlers/workshopsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,9 +1849,10 @@ def _apply_environment_patch(patch):
resource_objects = [docker_persistent_volume_claim]

if docker_compose:
# Only allow volume mounts and not bind mounts. Where a volume
# mount references the named volume "workshop" convert that to a
# bind mount of workshop home directory.
# Where a volume mount references the named volume "workshop"
# convert that to a bind mount of workshop home directory. We
# should probably block certain types of mounts but allow
# everything for now.

docker_compose_services = xget(docker_compose, "services", {})

Expand All @@ -1870,6 +1871,8 @@ def _apply_environment_patch(patch):
)
else:
docker_compose_service_volumes.append(volume_details)
else:
docker_compose_service_volumes.append(volume_details)

docker_compose_service["volumes"] = docker_compose_service_volumes

Expand Down

0 comments on commit 487ed2d

Please sign in to comment.