It feels like cargo-cult computer usage. The description states: "Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS.". Containers aren't really light on resources if the host kernel is not Linux and not messing with OS is easily attainable by installing the binaries in a custom prefix directory (e.g. ~/bin). This is especially true for compilers which…
Perhaps if we append "and your underlying OS won't mess with it", then you'll begin to see some value here?
Clang 5 in a Docker container for C++17
31–40 of 69 posts
Re: Clang 5 in a Docker container for C++17
#32For example, Ubuntu 17.10 provides clang-5.0-3 and g++ 7.2.0. Installing clang 5 there is as easy as
sudo apt install clang-5.0
It's also easy to install various compilers side-by-side there, without messing up the entire system.For die hard everyday C++ development, one probably does not want the C++ compiler run in a somewhat restricted container and experience all the potential trouble and limitations.
However, containerizing the compiler is a good way for providing a standardized build environment, because one can pin the exact versions of the compiler, libraries etc.
I have also seen people moving all their not-so-important stuff and/or the components that they do own maintain themselves out into Docker containers, in order to keep their base systems lean and clean. And so they can get rid of the containerized things easily should they become irrelevant. Plus keeping the containerized things relatively stable and unaffected by changes to the base system.
Re: Clang 5 in a Docker container for C++17
#33Re: Clang 5 in a Docker container for C++17
#34It feels like cargo-cult computer usage. The description states: "Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS.". Containers aren't really light on resources if the host kernel is not Linux and not messing with OS is easily attainable by installing the binaries in a custom prefix directory (e.g. ~/bin). This is especially true for compilers which…
Perhaps if we append "and your underlying OS won't mess with it", then you'll begin to see some value here?
Re: Clang 5 in a Docker container for C++17
#35Re: Clang 5 in a Docker container for C++17
#36Recent versions of several Linux distributions and FreeBSD have made newer clang and g++ versions available, which both have decent support for C++17 features. For example, Ubuntu 17.10 provides clang-5.0-3 and g++ 7.2.0. Installing clang 5 there is as easy as sudo apt install clang-5.0 It's also easy to install various compilers side-by-side there, without messing up the entire system. For die hard everyday C++ deve…
Hell, even on CentOS 7 you can install devtoolset-7 and get GCC 7.2.1
Re: Clang 5 in a Docker container for C++17
#37Solarian programmer seems to be a talented C++ coder.
Thanks for the projects.
The Docker post was a niche thing. There's other posts for getting a system running with Clang 5 on other platforms: https://solarianprogrammer.com/2017/12/13/linux-wsl-install-.... Another cool post about C++17 and raspberry pi a few days earlier: https://solarianprogrammer.com/2017/12/08/raspberry-pi-raspb...
Sure, I wouldn't use Clang in a Docker container (heh). But there are some points. If building from LLVM+Clang from source, installing files/headers and such can mess up systems royally. One docker container could theoretically test drive clang everywhere without mucking up a system.
Re: Clang 5 in a Docker container for C++17
#38Re: Clang 5 in a Docker container for C++17
#39Just occurred to me: if Docker is a container software and not a vitalization software, how does it run Linux executables on an OSX host?
A year or two ago, it used to spin up Virtual Box.
Re: Clang 5 in a Docker container for C++17
#40Just occurred to me: if Docker is a container software and not a vitalization software, how does it run Linux executables on an OSX host?