You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently implementing a small bash script, which would launch an individual Matlab instance per user via Docker. Here is my current progress, and I can launch it for all three "versions" (X11, browser, VNC):
#!/usr/bin/env bash
IMAGE="mathworks/matlab"
VERSION="r2024b"
LICENCE="<path to licence file>"
SHM_SIZE="512M"
COMMAND_END=""
COMMAND_PARAM="-e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix:ro"if [ -z"${1}" ];then
xhost +
elsecase$1in"browser")
COMMAND_PARAM='-p 8888:8888'
COMMAND_END='-browser'
;;
"vnc")
COMMAND_PARAM='-p 5901:5901 -p 6080:6080'
COMMAND_END='-vnc'
;;
*)
echo"'${1}' is not a valid flag. Please use 'browser' or 'vnc' for the respective protocoll or nothing for X11"exit 1
;;
esacfieval'docker run --init -it --rm \ ${COMMAND_PARAM} \ --user ${UID}:${GID} \ -e MLM_LICENSE_FILE="/network.lic" \ -v ${LICENCE}:/network.lic \ -v ${HOME}:/home/matlab/workdir \ --shm-size=${SHM_SIZE} \ ${IMAGE}:${VERSION} \ ${COMMAND_END}'
When running the script (with VNC), I get the following permission error:
Is there a way to make these things available for any user/group ID? Or are there any security reasons for doing so?
It would be nice to change the user ID inside the container without building a new image per user :)
The text was updated successfully, but these errors were encountered:
Thanks for highlighting your use case for setting the UID and GID at run time in the container, this is something that we are investigating and will feed back here when we have more information on the matter
I am currently implementing a small bash script, which would launch an individual Matlab instance per user via Docker. Here is my current progress, and I can launch it for all three "versions" (X11, browser, VNC):
When running the script (with VNC), I get the following permission error:
Is there a way to make these things available for any user/group ID? Or are there any security reasons for doing so?
It would be nice to change the user ID inside the container without building a new image per user :)
The text was updated successfully, but these errors were encountered: