Feature spotlight: In-cluster builds
Published on Sep 23, 2020
One of our goals with Blimp is to make it as light as possible. Even 16GB MacBook pros are too small to develop modern applications when you factor in the overhead of running an IDE, browser, the Docker VM (if you’re on Mac), and the application itself.
The Docker VM in particular is annoying since it consumes resources even when you’re not developing, and has issues with leaking resources.
With our new in cluster Docker builds feature, we’re continuing to speed up the development loop by lightening your laptop, and speeding up builds.
From one of our users:
“The performance has improved drastically after the remote docker builds feature, almost 90% improvement as compared to the last build I made before that feature. Kudos for that… 👍” -Jeethesh Kotian, DeveloPerSpective
Before, Blimp required running Docker locally if you used the build field in Compose files.
services: build-me: build: .
We would make an API request to the local Docker daemon to build the image, then push it into our container registry.
Now, we provide a Buildkit instance for each user in the cloud, that Blimp uses to build images, so you don’t need Docker installed locally at all.
Benefit 1: Uninstall Docker
This feature removes Blimp’s only dependency on Docker locally. We still run everything on Docker in the cloud, but that doesn’t impact your local machine.
This speeds up your local machine, and removes a complex dependency that might break.
If you have Docker running locally, we default to it for backwards compatibility. But if not, we build in the cluster.
Benefit 2: Faster Builds
Because the Docker build happens in the cloud, it benefits from running on a beefy machine, and a fast internet connection. For example, a Dockerfile that just installs packages is very quick since the remote buildkit container almost certainly has higher network bandwidth than your local machine.
FROM node COPY package*.json . RUN npm install .
Benefit 3: Faster Pushes
We’ve invested a lot in making image pushes as fast as possible. Another feature we’ve built pushes base images from our cluster to reduce the bandwidth used.
By building in our cluster, pushing the built image is super quick because your laptop isn’t involved.
Our biggest concern with this approach was that the build context might be large. Fortunately, buildkit has built in support for lazily loading files that are
COPYd into the container, so this isn’t as big of an issue as it might seem.
Try it out!
Try your setup with Blimp to access an infinite pool of resources in the cloud.
See how you can leverage volumes to use data containers to speed up boot time.