-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Trims the buildbox #14036
Trims the buildbox #14036
Conversation
- Enables the docker BuildKit in an attempt to speed up builds - Trims ~1GB off image size
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 with Gus's suggestions addressed.
@tcsc could you include |
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.
Yep, we need to do this for Centos 7 dockerfile and makefile command also. We're going to use Centos 7 for all amd64 artifacts for Teleport 10.
- Break more dependencies out into separate build stages - Add some simple supply-chain protections for dependencies sourced via git. The Docker build now checks that the commit SHAs are what we expect, and not just assume that the tags haven't changed. - Moves the `cbindgen` build to a stage to avoid pulling in extra dependencies not needed for the Teleport build - Combines the `gcloud` and firestore emulator install into one step to reduce the layer count. - Ports some of the above the Centos7 Dockerfile.
…o tcsc/trim-buildbox-buildkit
build.assets/Makefile
Outdated
@@ -121,7 +121,7 @@ build-binaries-fips: buildbox-fips | |||
buildbox: | |||
if [[ "$(BUILDBOX_NAME)" == "$(BUILDBOX)" ]]; then \ | |||
if [[ $${DRONE} == "true" ]] && ! docker inspect --type=image $(BUILDBOX) 2>&1 >/dev/null; then docker pull $(BUILDBOX) || true; fi; \ | |||
docker build --platform=linux/$(RUNTIME_ARCH) \ | |||
DOCKER_BUILDKIT=1 docker build --platform=linux/$(RUNTIME_ARCH) \ |
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.
There’s also a leading space here; doesn’t make any difference to the way it runs, just can’t unsee it 😁
Enables the docker BuildKit in an attempt to speed up builds, and trims just under 2GB off the image size.
Prior to these changes,
docker image ls
reported the image as 6.08GB after a local build, and5.06GB4.17GB afterSee-Also: #6149