RubyMine 2024.2 Help

FAQ about Dev Containers

I see various volumes and properties in Docker after I created a Dev Container. What does each of them do?

After a Dev Container is created, the following volumes and properties appear in Docker:

  • jb_devcontainers_shared_volume: the process of copying an IDE backend takes a certain amount of time. However, this process is done only once during the first Dev Container creation, and everything is copied into this volume. Then, this volume is shared among multiple containers, and we don't need to repeat the downloading process. If we create a Dev Container using another IDE or a different IDE version, we copy it into the same Docker volume. All backends are stored in one volume, making it easy to manage.

    For example, remove unnecessary backends through the Manage backends dialog.

  • jb-devcontainer-features-xxx: if you use features in your devcontainer.json file then all features are placed into such images.

    Currently, the unnecessary images should be deleted manually.

  • jb_devcontainer_sources_xxx: if we use git clone then all sources are cloned into this volume using helper container (based on alpine/git image).

How do I add more log information when creating a Dev Container?

Add to Help | Diagnostic Tools | Debug Log Settings the following strings:

com.intellij.platform.ijent:all
com.intellij.clouds.docker.gateway.ijent:all

How do I understand that my SSH connection was successful for creating a remote Dev Container using -ssh git clone?

Run the following command:

docker --host <ssh> build <git-url>:<context-dir>

Check the following example:

docker --host ssh://jetbrains@MUNIT-234:22 build git@git.jetbrains.team/devcont/DevCont_test_cases.git:.devcontainer

Why is the alpine/git image pulled during Dev Container creation?

We create a helper container based on the small alpine/git image, which contains some of the required tools or libraries, for example, Git or the SSH client. We need that to clone the repository that can be absent in the image used for a Dev Container creation.

Why don't you use the Create Dev Container and Mount Sources option for the SSH Docker connections?

If we already have all the sources locally, there is no need to use such a complicated and slow method like Docker via SSH.

Is it possible to invoke building a Dev Container on the remote backend?

You can build a Dev Container for a project with the .json file that resides on the remote backend.

For more information, refer to Start Dev Container for a remote project.

Why do I need to have Docker installed locally to create a Dev Container remotely by SSH?

The local Docker collects the correct context and clones only the necessary files into a Dev Container instead of the entire repository, which can be quite large.

The local Docker CLI is required for the current implementation to collect the correct context and clone only the necessary files into the remote machine. You can check requirements in the Prerequisites for working with Docker on a remote server section.

Last modified: 20 August 2024