Code Monkey home page Code Monkey logo

cppenv's Introduction

A C++ build environment with Docker

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:

  1. Provide a Docker container with stable headers and libraries for C++ build.
  2. Provide another container with a tooling.

Create a data volume container

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

Run a container for a purpose of executing commands

The container will be disposed just after you exit bash.

docker run --rm -i --volumes-from cpplibs orian/cppenv:v1 /bin/bash

Run a compilation inside a container

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:

cppenv's People

Contributors

orian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.