xgo
xgo copied to clipboard
Suggestion: Add docker Parameter -u `id -u`:`id -g`
Hello
just a suggestion:
add: -u id -u
:id -g
example:
docker run -v /home/dan:/home/dan -u
id -u:
id -gIMAGE
"source: https://stackoverflow.com/questions/20894086/in-docker-writing-file-to-mounted-file-system-as-non-root"
if you can add this by default to the passed arguments for docker, it would be great. There is no need to have the compiled output with root:root permissions, with this output files should be owned by current user
I found this issue while looking for a solution for file ownership when I realised that duh, the build system uses Docker.
So...
docker run --rm -v $PWD/build:/target busybox:latest chown -R $(id -u):$(id -g) /target
Just put that in whatever script after the xgo
call.
I hope this helps.