Hi all,
Bazel newbie here, seeking guidance around (supposedly?) basic usage.
Feel free to point me at existing relevant docs, that I failed locating on my own...
What I'm trying to achieve:
1. Build a couple of Docker images.
2. Be able to run the build on Linux & OS X hosts (bonus points for Windows host too), with Linux Docker images as the target.
3. The build should run in a sandbox that doesn't assume anything about the host environment (e.g. require just Bazel and maybe Docker on the host, not clang etc.). I am under the impression that this is inherent to Bazel, though after playing with it a little I'm not sure.
As you can see, this Dockerfile runs a build (using clang) in a build-container, in which I install the build toolchain and dependencies (e.g. clang & boost-dev), followed by an app-container in which I install only the runtime dependencies (e.g. no clang and only runtime boost) and copy the compiled binary from the build-container.
My goal is to figure out how to end up with the same final artifact (a relatively slim Docker image with minimal runtime dependencies) using Bazel, and be able to build the same artifact from Linux as well as OS X.
Any guidance would be much appreciated!
Itamar.