-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add multi-arch support to all images #15023
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aanm
added
release-note/misc
This PR makes changes that have no direct user impact.
area/build
Anything to do with the build, more general then area/CI
labels
Feb 18, 2021
maintainer-s-little-helper
bot
assigned errordeveloper, joestringer, tklauser and aditighag and unassigned errordeveloper
Feb 18, 2021
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: André Martins <andre@cilium.io>
Rename 'Dockerfile.dockerignore' files as '.dockerignore' in each subdir of 'images/'. It will still be used, but this allows make based builds to override it with a generated 'Dockerfile.dockerignore' file. Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
As dockerfiles are now in the buildkit syntax there is no need to create translated copies of them. This also removes the need for the '_build' directory. 'images/*/Dockerfile.dockerignore' is still automatically generated from the '.gitignore' files in the repository. This avoids sending 100's of MB of unneeded files (.git/, binaries, etc.) to the docker build context. Support for pushing manifests from make targets is removed as we now use docker buildx by default. Define DOCKER_BUILDX=1 to turn on multi-arch builds and automatic push. Without it the built images are loaded to the local docker only. Images can be pushed manually from there. Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Use images/cilium/Dockerfile for Envoy reference & do not require Envoy reference when not building Cilium. Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Signed-off-by: André Martins <andre@cilium.io>
aanm
force-pushed
the
pr/add-multi-arch-support
branch
from
February 22, 2021 14:45
a0bdb67
to
ea7f78d
Compare
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: André Martins <andre@cilium.io>
Use `docker buildx build` explicitly rather than redefining `CONTAINER_ENGINE` as `docker buildx`, as that caused docker runs be executed as `docker buildx run`, which does not work. Add `Makefile.docker` to the autogenerated dockerignore files, and make `make` ignore it if missing. Add support for detecting `ARCH` for docker builds. Defaults to empty which is interpreted as build for the default platform of the current builder (typically the host platform using the default builder). `ARCH=multi` triggers multi-arch builds for all the supported platforms, currently linux/amd64 and linux/arm64. Other recognized values are `ARCH=amd64` and `ARCH=arm64` for single platform builds. When ARCH is specified and the current builder is the "default" builder, a new cross-platform builder is created for all the supported platforms. Add support for `DOCKER_BUILDKIT_IMAGE` that allows dev to pass a private image which is needed when using a self-signed docker registry via `DOCKER_REGISTRY`. Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Signed-off-by: André Martins <andre@cilium.io>
aanm
force-pushed
the
pr/add-multi-arch-support
branch
from
February 22, 2021 17:55
ea7f78d
to
cbfbda7
Compare
joestringer
approved these changes
Feb 22, 2021
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.
Latest docs LGTM.
tklauser
added a commit
to tklauser/cilium
that referenced
this pull request
Mar 12, 2021
…IMAGE Since the refactoring of the get-image-digest.sh script in commit 8e00f78 ("re-write get-image-digest script") as part of the image build refactoring in cilium#15023, it should no longer be necessary to check the usage of the image tag before getting the sha256. Just determine it once outside the loop, regardless of usage in the respective files. This will make it easier in the successive commit to replace the full image name in files other than images/*/Dockerfile. Signed-off-by: Tobias Klauser <tobias@cilium.io>
kkourt
pushed a commit
that referenced
this pull request
Mar 15, 2021
…IMAGE Since the refactoring of the get-image-digest.sh script in commit 8e00f78 ("re-write get-image-digest script") as part of the image build refactoring in #15023, it should no longer be necessary to check the usage of the image tag before getting the sha256. Just determine it once outside the loop, regardless of usage in the respective files. This will make it easier in the successive commit to replace the full image name in files other than images/*/Dockerfile. Signed-off-by: Tobias Klauser <tobias@cilium.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/build
Anything to do with the build, more general then area/CI
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add multi-arch support into all images
cilium-sha
label as builds are done by GH Actions.Makefile: add install-bash-completion target
When building images in multi-arch, we do cross-compilation of Cilium.
With this cross-compilation we won't be able to run Cilium to generate
the bash-completion of the binary. Thus, we need to have a new Makefile
target that installs the binaries without executing and binary and
another target that creates the bash-completion files by executing the
binary.
Added lots of improvements in the building process of cilium-{runtime,builder}
Once this PR is merged
[quay|docker].io/cilium/*:latest
, thelatest
tag of all official images, will cease to exist.Note for reviewers:
- Ignore the commitadd branch for testing temporarily
, as it is used to test GH actions, it will be removed before merging.Follow up PRs:
add support for cilium/hubbleedit: DONE!