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

allow dockerd builds without cgo #39327

Merged
merged 3 commits into from
Jun 7, 2019
Merged

Conversation

tonistiigi
Copy link
Member

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

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@e0fefb9). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master   #39327   +/-   ##
=========================================
  Coverage          ?   37.05%           
=========================================
  Files             ?      612           
  Lines             ?    45522           
  Branches          ?        0           
=========================================
  Hits              ?    16867           
  Misses            ?    26371           
  Partials          ?     2284

@thaJeztah
Copy link
Member

NB: too bad we don't have a place to document all docker build tags :-\

@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

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

None yet

8 participants