Dockerfile: use TARGETPLATFORM to build Docker#44546
Conversation
|
@crazy-max this one can be rebased 👍 |
0dd8bb2 to
82322a1
Compare
b567f53 to
8d0600f
Compare
thaJeztah
left a comment
There was a problem hiding this comment.
was still reviewing, but had one comment pending already; let me submit that one
e153e02 to
bd076dd
Compare
corhere
left a comment
There was a problem hiding this comment.
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.
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 <[email protected]>
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]>
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]>
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]>
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]> (cherry picked from commit 489c823)
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]> (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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]> (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 <[email protected]> (cherry picked from commit 9457042) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This var was used for the cross target but it has been removed in moby#44546 so not necessary anymore Signed-off-by: CrazyMax <[email protected]>
related to moby/moby#44546 Signed-off-by: CrazyMax <[email protected]> (cherry picked from commit 489c823) Signed-off-by: Sebastiaan van Stijn <[email protected]>
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
--platformflag of buildx for a seamless integration.This removes unnecessary extra cross logic in the Dockerfile, removes
DOCKER_CROSSPLATFORMSandCROSSvars 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