Skip to content
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

Reduce buildbox image size #6149

Open
awly opened this issue Mar 25, 2021 · 6 comments
Open

Reduce buildbox image size #6149

awly opened this issue Mar 25, 2021 · 6 comments

Comments

@awly
Copy link
Contributor

awly commented Mar 25, 2021

The current buildbox image is >1GB.
This hits our CI performance and cost.

We should trim the amount of data in the image and/or use multi-stage builds.

@webvictim
Copy link
Contributor

I'm working on #6145 as a quick resolution to Docker-related slowdowns as well.

I've also just realised that Drone's sqlite database is 4GB in size and located on a standard GKE PV which uses spinning disks rather than SSDs.

@webvictim
Copy link
Contributor

@tcsc
Copy link
Contributor

tcsc commented Jul 1, 2022

Some candidates for easy wins:

  • Delete the gcloud backup directory /opt/google-cloud-sdk/.install/.backup after installing gcloud sdk & firestore emulator (this is several hundred MB by itself)
  • Make a shallow clone of the protobuf repo, e.g.
RUN (git clone https://github.com/gogo/protobuf.git --branch ${GOGO_PROTO_TAG} --depth 1 ${GOPATH}/src/github.com/gogo/protobuf && \
     cd ${GOPATH}/src/github.com/gogo/protobuf && \
     make install && \
     make clean)
  • Delete the etcd tarball after it's unpacked
  • Run make clean after make install for protobuf & libbpf

@tcsc
Copy link
Contributor

tcsc commented Jul 1, 2022

The current buildbox image is >1GB.

This seems so quaint now, as our buildbox is currently > 6GB

@zmb3
Copy link
Collaborator

zmb3 commented Sep 26, 2023

This seems so quaint now, as our buildbox is currently > 6GB

Hey, we're down to under 4.5GB now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants