What I'm missing from working at Google is a build environment. It just worked. Blaze, the build system providing distributed build was awesome, with few other very convenient tools like version control system it was a pleasure to code. Blaze was recently open sourced as Bazel so now everyone may use it.
Right now I'm challanged with configuring a build environment for myself and I turned my eyes on Docker. I would like to be able to easily reproduce build environment on any Linux machine. Right now I'm just installing deps and tools on my dev machine but this approache scales poorly even solely for myself. Additionally any system upgrady may destroy my environemnt by changing a version of library or some tool. Thus, I came with idea:
- Provide a Docker container with stable headers and libraries for C++ build.
- Provide another container with a tooling.
This container will keep all installed libraries in /libs/
directory. It allows to share the libs between multiple machines.
docker create -v /libs --name cpplibs orian/cppenv:v1 /bin/true
The container will be disposed just after you exit bash.
docker run --rm -i --volumes-from cpplibs orian/cppenv:v1 /bin/bash
docker run --rm -i --volumes-from cpplibs -v /home/orian/workspace/cpp/smth:/src:ro -v /tmp/build:/build orian/cppenv:v1 /bin/bash
Helpful resources:
- Dev env with Docker at Terse System
- Data Only Container Madness link