Prerequisites and limitations
Prerequisites
You have a project that contains the
.devcontainer
folder with thedevcontainer.json
file that describes the actual Dev Container.Currently, the code completion for the
devcontainer.json
file is limited. However, the following properties are available:Build properties are supported.
General properties except
otherPortsAttributes
,remoteUser
,updateRemoteUserUID
,userEnvProbe
, andcustomizations
.Docker compose properties are supported.
Lifecycle scripts are supported except
waitFor
.In port attributes only
label
is supported.The minimal host requirements are not supported.
Variables in
devcontainer.json
are supported.
You have access to GitHub.
You have the Git 2.20.1 version or later installed on your machine.
You have a running SSH agent on your local machine.
For example, on Windows, when you build a Dev Container from the GitHub repository using the SSH URL, the
- git clone
operation (cloning the repository sources to the Docker volume connected to the auxiliary container) cannot be performed without the running SSH agent.You have Docker installed on the machine where a Dev Container will reside.
PyCharm supports alternative Docker daemons such as Colima and Rancher Desktop (with the
dockerd
engine).If you encounter issues working with these Docker alternatives, submit a bug report to the issue tracker.
The minimal backend requirement for mounting sources is the installed Docker. Docker alternatives such as Colima, Podman, or similar are not supported.
Your Docker resources meet the minimal system requirements for the backend.
Additional prerequisites for a remote Dev Container
The following is a list of additional prerequisites for running your Dev Container on a remote server:
Docker is installed on both the remote and local machines.
The authorization to a server and Git is done through SSH keys. If you connect to a remote server using a password, generate the key-pair locally and then forward it to a remote server. For more details, refer to Sharing credentials.
Some additional dependencies might be required for a Dev Container.
If your Dev Container does not start, make sure you have the following dependencies in the OS of the Dev Container in the
devcontainer.json
file:curl
unzip
ps
libxext
libxrender
libxtst
libxi
freetype
procps
gcompat
Dev Container limitations
Dev Container images based on the Windows OS are not supported
When a scenario with the remote server is used for creating a Dev Container, a
tmp
working directory is created and cleaned later on when the Dev Container is built. To avoid errors in thedevcontainer.json
properties, Docker file, and Docker-compose related to a mount process and relative paths, we list all the build steps and include a warning about mount (taken from the container inspect file) when the Dev Container is created.Check the following warning example:
WARNING: Mount from /var/folders/0h/f3gs9sz96xdbqnp63t7bs4b80000gn/T/jb_devcontainer_sources_12dc6d53a2ae8fac66e0a54e76f501464151078046496127718/DevCont_templates/.devcontainer to /workspaces is referenced to temporary folder used for build. This may lead to unexpected behaviour or not working devcontainer. Please check that your devcontainer configuration is expected for build from git repository.A scenario of creating a Dev Container from the running backend-client connection is not supported.
For example, you connected to your remote project using the SSH connection and you've added a
devcontainer.json
. There is no option to start a Dev Container from the createddevcontainer.json
file.
However, you can use the following procedure as a workaround:
Create a Dev Container on the remote machine
Create a Docker connection to SSH.
Install the Docker CLI locally.
On Windows, you can install it without the Docker desktop; we don't need the Docker daemon, we need only Docker CLI.
Commit all changes from the SSH machine to Git.
Create a Dev Container by using remote server and the
git clone
command.