-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[20.10 backport] dockerfile based binary building #3042
Conversation
0a0354f
to
9e11626
Compare
Using cross compilation toolchains that work from any platform Adds darwin/arm64 support and bake targets. Static and dynamic binary targets are available, both with glibc and musl. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 6423da8) Signed-off-by: Tibor Vass <tibor@docker.com>
New solution is not hardcoded to amd64 but integrates with the cross toolchain and support creating arm binaries. Go has been updated so that ASLR works Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 8b822c9) Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit a2a1de5) Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit bd3e853) Signed-off-by: Tibor Vass <tibor@docker.com>
More can be removed/refactored but avoiding a huge change. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 706e857) Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit b099c9c) Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 26b633d) Signed-off-by: Tibor Vass <tibor@docker.com>
…ckwards compat Signed-off-by: Tibor Vass <tibor@docker.com>
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
I guess we technically don't need to backport #2996 unless we really want to make a windows/arm64 release. edit: not against windows/arm64 release so if we're going to do it I can lgtm. |
Go doesn't recognize windows/arm64 as a valid target, though. |
@cpuguy83 https://github.com/docker/cli/blob/a32cd16160f1b41c1c4ae7bee4dac929d1484e59/Dockerfile#L14https://github.com/docker/cli/blob/a32cd16160f1b41c1c4ae7bee4dac929d1484e59/Dockerfile#L14 does But I guess plugins are built somewhere differently that would also need exception so no need to rush with it yet. |
I really don't like the way this was done. I would also really prefer to not backport this to 20.10 because it breaks downstream builds. |
9e11626
to
a160e60
Compare
Docker 20.10 only supports windows/amd64, and though tonistiigi/xx allows us to support many other architectures, I preferred to not have to vendor in 12k lines of golang.org/x/sys just to get windows/arm64 working. This is only meant for 20.10. Signed-off-by: Tibor Vass <tibor@docker.com>
a160e60
to
dc017bd
Compare
@tonistiigi Sorry I thought I pushed the changes to remove windows/arm64 and that sys vendor commit. Updated now. @cpuguy83 I know it's not great to do this in 20.10 which is why I kept the Makefile as backwards compatible as possible while still building the new way. Which part specifically breaks down downstream for you? |
Codecov Report
@@ Coverage Diff @@
## 20.10 #3042 +/- ##
=======================================
Coverage 57.02% 57.02%
=======================================
Files 297 297
Lines 18679 18679
=======================================
Hits 10651 10651
Misses 7163 7163
Partials 865 865 |
For posterity, talked with @tianon on Slack about this. This backport is not the same as master and makefile targets still work correctly. |
Cherry-picks of #2996 and #2993 with added commit that reverses some changes in the main Makefile to limit the script changes within the same 20.10 release. The main purpose is to have darwin arm64 builds working in 20.10.