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

Excessive CPU usage when building Dockerfiles #654

Closed
mm318 opened this issue Jul 25, 2019 · 4 comments · Fixed by #656
Closed

Excessive CPU usage when building Dockerfiles #654

mm318 opened this issue Jul 25, 2019 · 4 comments · Fixed by #656

Comments

@mm318
Copy link
Contributor

mm318 commented Jul 25, 2019

When building some Dockerfiles as part of the prerelease flow, we are getting stuck at the step:

Step 9/25 : RUN useradd -u 629291812 -m buildfarm

with excessively high CPU usage. This is apparently an issue with Docker (https://forums.docker.com/t/run-adduser-seems-to-hang-with-large-uid/27371/2)

As a workaround can you please modify your Dockerfile to do something like

useradd -u @uid -l -m buildfarm

instead?

@dirk-thomas
Copy link
Member

The Dockerfiles generated by this package don't use a hard coded uid. Instead they use the uid of the current user outside of Docker in order to ensure that the generated files in mounted directories can be read / written by the calling user.

You might want to double check the user id you are invoking the script with: echo $UID.

@mm318
Copy link
Contributor Author

mm318 commented Jul 26, 2019

I'm not asking for the Dockerfiles generated by this package to use a different UID.

I'm asking for the Dockerfiles generated by this package to use an additional -l or –no-log-init option for the useradd command, as suggested in https://forums.docker.com/t/run-adduser-seems-to-hang-with-large-uid/27371.

@dirk-thomas
Copy link
Member

Thanks for clarifying. So your local UID is that high and you would like to use -l / --no-log-init with useradd.

Please consider to create a pull request for this change in all locations where useradd is being invoked.

@mm318
Copy link
Contributor Author

mm318 commented Jul 26, 2019

Right, our local UID is that high probably because we are on corporate machines. I will make the pull request. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants