-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Dockerfile: use TARGETPLATFORM to build Docker #44546
Conversation
@crazy-max this one can be rebased 👍 |
0dd8bb2
to
82322a1
Compare
b567f53
to
8d0600f
Compare
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.
was still reviewing, but had one comment pending already; let me submit that one
e153e02
to
bd076dd
Compare
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.
I didn't get past the first commit. There are so many behaviour changes to the hack/make
scripts which have nothing to do with the PR description or commit message.
hack/make.sh
Outdated
export DOCKER_BUILDFLAGS=(-tags "${DOCKER_BUILDTAGS}" -installsuffix netgo) | ||
# see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here |
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.
It looks like -installsuffix
was necessary to work around bugs in go build
which appear to have been fully resolved in go1.5.
0bc5c53
to
01b9872
Compare
@corhere Yes this was indeed ahead of the expectations, sorry about that. It should be easier to review now. |
01b9872
to
39affad
Compare
d5e391c
to
00c980e
Compare
follow-up moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> (cherry picked from commit 489c823)
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> (cherry picked from commit 489c823)
Following changes for cross-compilation in moby#44546 the cross script setting GOARM to the expected value has been removed but changes not carried in .binary script Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Following changes for cross-compilation in moby#44546 the cross script setting GOARM to the expected value has been removed but changes not carried in .binary script Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Following changes for cross-compilation in moby#44546, we forgot to remove the toolchain configuration that is not used anymore as xx already sets correct cc/cxx envs already. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Build currently doesn't set the right name for target ARM architecture through switches in CGO_CFLAGS and CGO_CXXFLAGS when doing cross-compilation. This was previously fixed in moby#43474 Also removes the toolchain configuration. Following changes for cross-compilation in moby#44546, we forgot to remove the toolchain configuration that is not used anymore as xx already sets correct cc/cxx envs already. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Build currently doesn't set the right name for target ARM architecture through switches in CGO_CFLAGS and CGO_CXXFLAGS when doing cross-compilation. This was previously fixed in moby#43474 Also removes the toolchain configuration. Following changes for cross-compilation in moby#44546, we forgot to remove the toolchain configuration that is not used anymore as xx already sets correct cc/cxx envs already. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> (cherry picked from commit 9457042)
Build currently doesn't set the right name for target ARM architecture through switches in CGO_CFLAGS and CGO_CXXFLAGS when doing cross-compilation. This was previously fixed in moby#43474 Also removes the toolchain configuration. Following changes for cross-compilation in moby#44546, we forgot to remove the toolchain configuration that is not used anymore as xx already sets correct cc/cxx envs already. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> (cherry picked from commit 9457042) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This var was used for the cross target but it has been removed in moby#44546 so not necessary anymore Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
related to moby/moby#44546 Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> (cherry picked from commit 489c823) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
follow-up #43529
needs #44513fixes #41590
fixes #41862
fixes #41519
fixes #39380
closes #43492
closes #43613
Better support for cross compilation so we can fully rely on
--platform
flag of buildx for a seamless integration.This removes unnecessary extra cross logic in the Dockerfile, removes
DOCKER_CROSSPLATFORMS
andCROSS
vars and some hack scripts as well.Non-sandboxed build invocation is still supported and dev stages in the Dockerfile have been updated accordingly.
Bake definition and GitHub Actions workflows have been updated accordingly as well.
cc @thaJeztah @rumpl @vvoland