PyCharm 2024.3 Help

Start Dev Container inside IDE

You can open a project that has the .devcontainer folder with the devcontainer.json file in the root inside PyCharm and start a Dev Container from the IDE by using Docker.

Create Dev Container from the IDE

  1. Open your project with the devcontainer.json file inside the IDE.

  2. Open the devcontainer.json file in the editor.

  3. In the left gutter, click Create Dev Container, select Create Dev Container and Mount Sources and select the backend IDE with which you want to work inside the container.

    Mount sources

    The following options are also available in the context menu:

    • Create Dev Container and Clone Sources: use this option to clone your project into a Dev Container.

    • Show Dev Containers: use this option to check a list of existing dev containers. You can see which ones are active and running, stop them, or restart them.

      See dev containers
    • Manage Dev Container Backends: use this option to remove the unnecessary ones from Docker shared volumes.

      Manage backends
    • Add Modified Settings from IDE: use this option to add your IDE settings to the IDE backend that is running inside your Dev Container. The settings are added to the devcontainer.json file as a customizations section. It might be useful if you want to synchronize both settings or choose some other customization option.

      JSON file customizations section

      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 Alt+Enter in the settings section of the devcontainer.json file and select the appropriate option.

      JSON settings
  4. The process of creating a Dev Container is displayed in the Services tool window.

    After the Dev Container is created, click Connect.

    Creating a Dev Container

    The container is created and the project is opened in JetBrains Client.

Last modified: 09 October 2024