-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
allow dockerd builds without cgo #39327
Conversation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
eef31a0
to
cf104d8
Compare
Codecov Report
@@ Coverage Diff @@
## master #39327 +/- ##
=========================================
Coverage ? 37.05%
=========================================
Files ? 612
Lines ? 45522
Branches ? 0
=========================================
Hits ? 16867
Misses ? 26371
Partials ? 2284 |
@kolyshkin we could update https://github.com/moby/moby/blob/master/project/PACKAGERS.md#docker_buildtags But in general we need to unify / cleanup project documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
These patches allow building usable dockerd without the need of cgo. No changes to the current default way how we produce binaries.
Changes are in three areas:
Quota - uses cgo extensively but is an optional feature with feature detection already in caller. Add a new build tag that can be used to build without it.
Copy - cgo used for the ioctl based fast copy that has been replaced with the syscall. Change is to skip this check on !cgo . The copy_file_range and fallback methods still provide the feature. As it is only used for constant I could also just hardcode it in !cgo version if we want to keep it.
Stats: uses sysconf. Replaced with
unix.SchedGetaffinity