Customizing various Dev Container settings
You can customize devcontainer.json
file by adding the required settings, plugins, and so on.
Open the
devcontainer.json
file in the editor.In the left gutter, click
, select Add Modified Settings from IDE.
The settings are added as a
customizations
section. It might be useful if you want to synchronize both settings or choose some other customization option.You can also add the non-default application-level settings, modify the added settings options, sort them, or add properties from the JSON schema. Press AltEnter in the
settings
section of thedevcontainer.json
file and select the appropriate option.
You can also install plugins from the JetBrains marketplace to a Dev Container.
Open JetBrains marketplace in the browser.
Locate the required plugin and open the plugin page.
On the plugin page, scroll down to the Additional information section and copy plugin ID.
Open the
devcontainer.json
file in the editor.Inside the
customizations
section, add the following code:{ "customizations": { "jetbrains": { "plugins": [ "org.intellij.plugins.hcl" ] } } }
The
pluginID
is the ID of the required plugin from JetBrains marketplace, for example,org.intellij.plugins.hcl
.
You do not need to additionally configure Git settings inside a Dev Container. The Git settings are automatically added to a Dev Container from your local global .gitconfig
file.
To check the settings inside the Dev Container, do the following
In the Services tool window, select Docker | Dev Containers and the necessary container.
Start the container by clicking the Start button.
Click
and select Show Files.
Select .gitconfig in the list of the files.
The following settings are copied if available:
user.email, user.name, pull.rebase, alias.*
The
alias.*
option means all the alias settings.note
Git needs to be available on both the user machine where the container is built and in the target Dev Container.