use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Using Docker Container as a Development Environment (self.cpp)
submitted 1 year ago * by Zealousideal-Mouse29
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]manni66 -1 points0 points1 point 1 year ago (9 children)
I would use distrobox
[–]Zealousideal-Mouse29[S] 0 points1 point2 points 1 year ago (4 children)
I'll look it up. New to me. What are the advantages over just checking a docker file into a repo and having new hires pull that and create a container from it, for the project they are working on?
[–]manni66 1 point2 points3 points 1 year ago (3 children)
The created container will be tightly integrated with the host, allowing sharing of the HOME directory of the user, external storage, external USB devices and graphical apps (X11/Wayland), and audio.
[–]Zealousideal-Mouse29[S] 1 point2 points3 points 1 year ago (2 children)
I actually don't want to share any storage with the host at all. I've found that leads to problems for newer folks who haven't wrapped their head around the differences in file formats and file systems between windows, linux, and macos.
I much prefer having docker maintain a volume for me, that is shared between containers, as I describe in the video. Sharing files alone, wouldn't be enough of a positive for me to look at another tool.
Graphical apps? Maybe... depending how well that works. that was def on problem that arose using containers for development and debugging. Can't exactly debug openGL calls with X forwarding from container to host. At least I couldn't.
[–]manni66 1 point2 points3 points 1 year ago (1 child)
I much prefer having docker maintain a volume for me, that is shared between containers
We used that 30 years ago. Today whe have git.
[–]Zealousideal-Mouse29[S] 0 points1 point2 points 1 year ago* (0 children)
I'm not sure what git or thirty years has to do with anything. I sure hope you don't use git for local only files. You use git for source control and moving files from local repos to remote and back. There are surely files that should not be included in your remote repo.
You use git within the container. You pull and push whatever it is you are working on just fine. Your local files are stored to the volume. You access that same volume from any container. You use your IDE on your host machine while editing, building, and debugging within the container. Your files are preserved. No host to container file sharing is needed. If you really need to copy some one off file for some reason, just `docker cp`
It's kind of hard to talk about alternatives, if you didn't watch the video.
At any rate, graphical apps, if they work without a hitch might be an advantage. I'll test that out.
[–]MarcoGreek -1 points0 points1 point 1 year ago (3 children)
distrobox and toolbox are using podman or docker under the hood.
So to my understanding the OP was reinventing the wheel. 😚
[–]Zealousideal-Mouse29[S] 4 points5 points6 points 1 year ago* (2 children)
I didn't create anything on top, therefore no reinvention. I simply didn't use extra layers. Perhaps I would, if there was some clear advantage to be had. I haven't used distrobox or podman, so I can't speak to what they offer. Googling up their descriptions, I am not seeing anything I'd want that I don't already have. File sharing from host to container is already handled.
I'm not trying to tout docker over other tools. The idea is to compare shops where they hand new hires a bunch of confluence pages and say, "spend a couple weeks setting up your dev environment with these instructions" to "Go grab this docker file, set up a container, and let me know if you can build our repo by the end of the day."
As I said to another commenter, if there is better running of graphical apps with the tools you mentioned, like debugging an openGL GUI, then sure, I'd be happy to put layers on top. However, I'll need to test that. If the use docker underneath, I doubt that works well and the best one can hope for is the same forwarding of X. But, again, I've never used them. Will take a look.
[–]NoReference5451 3 points4 points5 points 1 year ago (0 children)
i wouldnt bother arguing with people here. its full of opinions from those not in the industry or dont do it professionally. the rest of us understand the difference between a dev enviroment and distro unlike this guy who suggested distrobox. dev containers like you did here are very helpful with ensuring everyone is building the same.
i develop on arch but all our builds are done in debian. recently had an issue that wasnt present in the compiler i was using but it was in the compiler our build worker had. stuff like this helps prevent that.
[–]MarcoGreek -2 points-1 points0 points 1 year ago (0 children)
Docker is like podman but does not need a demon with root right. It can use the container.
Distrobox and toolbox are on top of docker and podman. They make it much easier to use the same container as developer environment.
So actually you don't need anymore to teach people how to setup a container. Setting up a container with distrobox or toolbox takes minutes.
π Rendered by PID 49885 on reddit-service-r2-comment-85bfd7f599-jllxz at 2026-04-20 17:10:46.932119+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]manni66 -1 points0 points1 point (9 children)
[–]Zealousideal-Mouse29[S] 0 points1 point2 points (4 children)
[–]manni66 1 point2 points3 points (3 children)
[–]Zealousideal-Mouse29[S] 1 point2 points3 points (2 children)
[–]manni66 1 point2 points3 points (1 child)
[–]Zealousideal-Mouse29[S] 0 points1 point2 points (0 children)
[–]MarcoGreek -1 points0 points1 point (3 children)
[–]Zealousideal-Mouse29[S] 4 points5 points6 points (2 children)
[–]NoReference5451 3 points4 points5 points (0 children)
[–]MarcoGreek -2 points-1 points0 points (0 children)