I propose here a new multi-stage
Dockerfile which separate compilation and binary for a smaller image.
docker build . -t openmole:latest
docker run --name openmole -p 8443:8443 -e UID=1000 -e GID=1000 openmole:latest
As you can see, volume are not present (
-v mydata/openmole:/home/mole/, and this is the next step. I want to support the OpenMole workspace as a volume, directly readable/writeable from the user files explorer. But there is a well know problem with permission on Volume when the user created in the container and the user who run the container on the host are different.
I solve the problem of uid/gid mapping of volume using the small su-exec; similar to gosu. This solution is common in many project to resolve the shareable volume between user in & out of the container, as you can see for example in radicale, postgres alpine project, etc.
But i have a problem with the location of my data in the container, in this configuration OpenMole write to
/root/.openmole by default, and not into
/home/mole as i want.
Is there possibility to force the path of the workspace during launch command ?