Why is Docker support so awful in CLion


I prefer using CLion over Visual Studio Code but using Docker seems impossible. I am working with someone else and they only have these three lines in a devcontainer.json file for visual studio code and it works flawlessly. How do I replicate this in Clion. I can't even figure out where to start:

    "image": "private-registry",
    "extensions": ["ms-vscode.cmake-tools", "ms-vscode.cpptools"],
    "remoteUser": "dev"


In short, you simply need to build the container and then create a Docker toolchain. Here is the detailed instruction - https://www.jetbrains.com/help/clion/clion-toolchains-in-docker.html


I have a pre-built image. I would prefer to just pull it from the registry. But I get unsupported registry when I try to add it. It just works on command line docker.

If I do go the toolchain route, what is needed? Do I have to connect ports for SSH, do I have to mount volumes to where my code is? I just want to be able to connect to an existing container and compile


>If I do go the toolchain route, what is needed?

You need to select your image. I kindly ask you to read the web help article or to watch the video from it.


After realizing you need to add https:// in front of the registry which is not needed on the command line. my main issue now is that the remoteUser feature of visual studio code just seems not possible with CLion


Indeed only the local Docker option can be used in CLion as a toolchain. For remote Docker, we recommend using remote with local sources. But in this case the container should be running with an SSH daemon.


Please sign in to leave a comment.