Docker Community Forums

Share and learn in the Docker community.

C++ development workflow with Docker


(Viacheslav Kalmykov) #1

I would like to ask for an advice on a development workflow with Docker.

We have 3 members in team, developing a C++ server-side app, which we want to run on RHEL6,
but still would like to utilize modern g++ compiler without rebuilding half of the OS.
The app also comes with quite a few dependencies, some of which need to be built from sources.
Sounds like Docker is a good fit for that, right?

One of the team members’ concern is that we loose the ability to debug the app locally
through XCode IDE, which is true, because XCode doesn’t support any kind of remote debugging.

Also without having dependencies’ headers locally, autocompletion won’t work in any kind of IDE.

We can run this app locally in OSX now if we manage to install all the dependencies for sure,
but Docker to my understanding is supposed to reduce the efforts required to configure the environment.

We considered using Vagrant for development or some Vagrant+Docker combination, but they
all seem to have the same drawbacks.

Did anyone have experience in solving that?

Thanks!


(Hong Xu) #2

What do you mean you want to utilize modern g++ compiler? To my understanding you only use it for debugging purpose right? I didn’t see your question… Can you make it clearer?


(Viacheslav Kalmykov) #3

Sure. RHEL 6 provides GCC 4.4 which lacks most of the C++11 features. We’d like to use C++11 in the development process, but to do this we either need to upgrade the compiler and corresponding stdlib on the server (which is not really a pleasant way to support source builds :slight_smile: ), or to virtualize environment where we run our app and have any GCC version as we want.
There is another option to use static builds, but the app as I said before has quite a few dependencies, so a static build would be huge and will also require to build all those dependencies static.
So it’s not about debugging only, it’s more about using C++11 in the full development cycle.

So my question basically is if anyone from the community had to deal with similar tasks before and maybe had had some experience to share? Combine ease of configuration of the development environment (including dependencies) with ease of the deployments.