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.
Hi Peter, thanks for doing these AMAs! I’m a Canadian currently working in the US on a TN visa. I am interested in starting my own SaaS startup.
I’m currently exploring my options to raise a pre-seed round as a solo founder. Will I be able to stay in the Bay Area to start a company as a solo founder with some pre-seed and angel investors?
If not, will it be possible with an American co-founder? If not that, what is the best way for a Canadian technical founder to continue to stay in the Bay Area to startup?
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.