Comment

Comment by jathu

We had a very large monorepo at my previous company and building Docker images required us to set the context at the root of the directory (libraries, protos and helpers scattered around the repo). On macOS this is extremely slow as Docker copies the context into the daemon. This used to take several minutes.

Fortunately, we also used Bazel. So I created a custom Bazel rule that aggregates all the required files of a target/service then builds the Docker image within the Bazel sandbox which only contains the files we need. This massively reduced the context size and thus the image build time. From several minutes to single digit seconds.

parent jathu 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton