Ah, so maybe what I want to achieve isn’t possible?
I’ll explain this a bit more. This snap is for using to run our projects for local development. On Ubuntu, the user will simply basically do this:
snap install dotrun
dotrun serve # Runs the "serve" script in "package.json" using the snap confinement
We want to provide a similar flow for our macOS users. So the plan is they basically do this:
multipass launch -n dotrun bionic
multipass exec dotrun -- snap install dotrun
multipass mount $HOME dotrun
alias dotrun='multipass exec dotrun -- dotrun -C "$(pwd)"'
(This is documented in the readme)
This will allow them to run
dotrun natively on their host system within their project directories and have it work as it would on ubuntu.
Of course we could instead mount their $HOME somewhere else under
/home/ubuntu inside the multipass, which will work, but it will be confusing for them because any paths they see in logs won’t match the paths on their host system.
Do you think there’s any way for me to achieve this experience with a strictly confined snap?