Open
Description
Two issues arise in Linux:
File permissions
Due to containers running as root
in Linux, whatever files they create in the binded volumes, can't be cleaned up by the user. That means that it's impossible to run the playground, unless you manually delete these files. On MacOs, Docker Desktop automagically spawns the containers with user permissions so that issue doesn't arise.
Error: unlinkat /home/ubuntu/.playground/devnet/data_validator/validators/logs/validator.log: permission denied
Attempted Fixes:
- Add a
user
field in every service of the docker compose with the uid and guid of the user who runs the go binary. It made services crash. rm -rf $HOME/.playground
after every run. Works, but it's a workaround.- Haven't found anything other that is elegant. Probably the elegant solution is to use Named Volumes instead of Binded Volumes and delete them in Stop(). Could have a performance hit on the spin up/down of the sandbox.
- Another idea would be to pass the user as an env variable and then run the binaries as that user, which could maybe solve it, but I haven't attempted that.
host.docker
doesn't seem to work on linux.
I see that the final docker compose has the extra flags that are needed to make it work on Linux, as per Stack Overflow, but so far this hasn't worked for us. Haven't spent huge amount of time in debugging it, probably using host
network mode would solve it.
Metadata
Metadata
Assignees
Labels
No labels