Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root owned files on docker host after building beats #1475

Closed
andrewkroh opened this issue Apr 25, 2016 · 3 comments
Closed

root owned files on docker host after building beats #1475

andrewkroh opened this issue Apr 25, 2016 · 3 comments

Comments

@andrewkroh
Copy link
Member

When running make testsuite, the build uses docker containers that mount a host volume. Files written to the volume from within the container are owned by root. Because these files are owned by root, on the host system they cannot be removed by a normal user.

This causes problems for Jenkins when it is configured to clean the workspace prior to executing a job. Jenkins handles the problem by moving the original workspace that cannot be deleted and creates a new one for the build. Over time this fills the disk.

One solution is to run the processes inside of the docker container using the same UID as the user that started the container. This can be done by building the container and passing in the user's UID using --build-arg UID=${UID}. See https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg

@cyrilleverrier
Copy link
Contributor

@andrewkroh : is it related to karalabe/xgo#37 ?
I had a look few months ago but I didn't really go far

@andrewkroh
Copy link
Member Author

@cyrilleverrier Yeah, it sounds like the same underlying issue (just not related to the usage of xgo).

@andrewkroh
Copy link
Member Author

I think this has been resolved by running a chown from inside the container to return the ownership to the user executing the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants