PyCharm 2021.3 Help

Docker

Specify the settings for accessing the Docker API. For more information about using the Docker integration with PyCharm, see Docker.

the Add button Docker

Add a new Docker configuration.

the Remove button Delete Alt+Delete

Remove the selected Docker configuration.

Docker configuration settings

Name

The name of the configuration.

Connect to Docker daemon with

Select the method for connecting to the Docker API.

  • Docker for Windows: The recommended option when using Docker Desktop for Windows.

  • Docker for Mac: The recommended option when using Docker Desktop for Mac.

  • Unix socket: This is the recommended connection option for Linux.

  • Docker Machine: If you are using Docker Toolbox for Windows or macOS, this is the recommended option for connecting to the Docker API. If the Connection successful message doesn't appear, check your Docker Machine executable setting on the Docker | Tools page.

  • TCP socket: This method should work for any Docker version and operating system. Use this method only for special cases and custom configurations. In most cases, you should use one of the recommended methods that don't require manual configuration.

    • If you are using Docker Desktop and want to connect through the TCP socket, enable the Expose daemon on tcp://localhost:2375 without TLS option in the General section of your Docker settings. Then set Engine API URL to tcp://localhost:2375.

      If the option is disabled, then you can connect through a named pipe: npipe:////./pipe/docker_engine.

      Leave the Certificates folder field empty.

    • If you are using Docker Toolbox, set Engine API URL to https://192.168.99.100:2376 and Certificates folder to %HOMEPATH%\.docker\machine\machines\default.

    • If you are using Docker Desktop, set Engine API URL to unix:///var/run/docker.sock and leave the Certificates folder field empty.

    • If you are using Docker Toolbox, set Engine API URL to https://192.168.99.100:2376 and Certificates folder to ~/.docker/.

    Engine API URL: unix:///var/run/docker.sock

    Certificates folder: leave empty

    You can manually configure the connection to the minikube's Docker Engine environment if the Minikube option fails to automatically detect it.

    Run the minikube docker-env command to get the necessary connection information and set the following:

    • Engine API URL: the value of DOCKER_HOST (with https as the protocol instead of tcp)

    • Certificates folder: the value of DOCKER_CERT_PATH

    You can connect to the Podman API, which is equivalent to the Docker Engine API. For more information, see Podman.

  • SSH: Connect to a remote Docker daemon via an existing SSH configuration or create a new one.

  • Minikube: If you are running minikube, select this option to automatically detect and connect to the minikube's Docker Engine environment.

Path mappings

For Windows and macOS: Specify the mappings for folders that can be shared between the host and the container volumes.

Use the Edit button to edit an existing mapping, or the Add button to create a new one.

  • Local path: The path to the local folder that you want to make available for volume bindings.

  • Virtual machine path: The corresponding directory path in the Docker virtual machine's file system.

Last modified: 12 April 2022