How to persist license when mounting toolbox into a Docker container?
Answered
Hello all,
I'm currently mounting my `~/.local/share/Jetbrains` folder inside a Docker container, so that I can use Clion with the same image and container as long as I need to. However when I recreate the container, CLion asks me to login into my Jetbrains account with a token, which is inconvenient when I do not have internet. Is there another location I can mount from the host so that CLion knows that it is activated?
The project I'm working is a bit of a configuration nightmare, and I've already tried the Docker toolchains and remote development over SSH, both of which have been more of a pain than logging in once a week.
Please sign in to leave a comment.
Hi Daniel!
>'Ive already tried the Docker toolchains and remote development over SSH, both of which have been more of a pain than logging in once a week
Could you please share the issues you faced? On what build system is your project based?
Hello Anna,
The build system I'm using is based on CMake, and it normally integrates pretty well with CLion's CMake support.
The biggest issue is that CLion's Docker feature doesn't support attaching to an existing running container (like the vscode remote development plugin does) and instead insists on creating a new container, eg. when I am configuring a docker toolchain in the cmake configuration, every attempt to generate the cmake configuration starts in a new container. This behavior isn't ideal for my use case where I want to start with a partially built environment, or don't want to rebuild my whole environment.
Besides needing to duplicate project files and the IDE, the SSH is noticeably slower (perhaps my organization's anti-malware?) than working on the project in a Docker container.
Hopefully that is helpful at the risk of being off topic, but I would still appreciate an answer to my original question regarding mounting the license into a container.
Anna Falevskaya, regarding SSH being noticeably slower, It seems the culprit is the remote development plugin consuming about half of my system memory, running the IDE on the guest. This is several times the normal memory usage of running CLion on the guest.
>The biggest issue is that CLion's Docker feature doesn't support attaching to an existing running container
In such scenario it's possible to develop in Docker using remote with local sources - https://www.jetbrains.com/help/clion/clion-toolchains-in-docker.html#old-approach
As for the original question, please see https://intellij-support.jetbrains.com/hc/en-us/articles/206544609:
and the comments: