Allow docker volume mounts for session containers
TilBlechschmidt opened this issue ยท 3 comments
Is your feature request related to a problem? Please describe.
A user attempted to download a PDF file and expected it to be locally available on-disk.
Describe the solution you'd like
It should be possible for session containers to have user-defined volume mounts.
Describe alternatives you've considered
Providing a directory whose contents get uploaded to the S3 backend upon session termination seems like a more generic and clean solution. However, it is a bit more involved but would make it possible to retrieve files from K8s sessions without relying on ReadWriteMany
storage classes.
Additional context
See TilBlechschmidt/ParallelSeleniumTest#2
MVP successfully implemented and verified:
orchestrator:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-orchestrator
command: orchestrator docker --volume /tmp/webgrid:/bla [...]
[...]
$ docker inspect webgrid-session-0bfe6b84-dce2-4b17-89a5-ec9eb1c06e4b
[
{
"Id": "66550770ae8a04cf9a272a3e228668ebd53752352eb038e32b095fce62272cf5",
"Created": "2021-12-06T14:04:58.448555096Z",
"Path": "/bin/sh",
"Args": [
"-c",
"/scripts/entrypoint.sh"
],
"State": {
"Status": "running",
[...]
},
"Image": "sha256:4ca6bd0339280410c8da4aaafcfe63d0108f7f323d175127a6087972bca678b2",
[...]
"Name": "/webgrid-session-0bfe6b84-dce2-4b17-89a5-ec9eb1c06e4b",
"HostConfig": {
"Binds": [
"/tmp/webgrid:/bla" <========
],
},
[...]
@makorne once the branch is merged, you should be able to add a command line argument like this one --volume /tmp/webgridSessionStorage:/somewhere
to your orchestrator in the docker-compose.yml
to mount the directory into your sessions.
@makorne the release containing the change is now live. In a couple of minutes the new docker images with the tag v0.7.0-beta
should be available. Make sure to download the up-to-date docker-compose file! Hope this solves your issues ๐
https://github.com/TilBlechschmidt/WebGrid/releases/tag/v0.7.0-beta