Build with Docker should create a build folder with current owner user instead of root
Hello Using this command line for build:
docker run --rm -it --name slate -v $(shell pwd)/build:/srv/slate/build -v $(shell pwd)/slate/source:/srv/slate/source slatedocs/slate build
The build folder is generated with the root owner
To delete it we need to use sudo
That is not nice for a CI/CD
Could you change the Dockerfile to generate the build folder with the current user as owner?
Hi mmaryo,
I used this blog post to solve a similar issue for me.
Basically add the following option to the docker command
-u $(id -u ${USER}):$(id -g ${USER})
So in your case
docker run --rm -it --name slate -u $(id -u ${USER}):$(id -g ${USER}) -v (shell pwd)/slate/source:/srv/slate/source slatedocs/slate build
should work.
Closed
Closed restricted sites