PyCharm 2016.2 Help

Docker Compose

Prerequisites

Make sure that the following prerequisites are met:

  • You are working on Linux or OS X platform.
  • Docker Compose is installed, as described on the page Docker Compose.
  • Before you start working with Docker Compose, make sure that the Docker integration plugin is enabled. The plugin is bundled with PyCharm and is activated by default. If it is not, enable the plugin as described in Enabling and Disabling Plugins.

Important note

A chosen service declared within a Docker Compose configuration file is supported as a Python interpreter. Python run configurations based on this interpreter operate like docker-compose up command with the addition that it maps project sources into the chosen service container.

The feature works for Linux with the local installations of Docker and OS X, it won't be shown in PyCharm running on Windows platform. On OS X, Docker Compose configuration file must be situated within the default shared folder /Users/.

Working with Docker Compose

In the Settings/Preferences dialog box, expand the node Build, Execution, Deployment, and in the Docker page, add the required Docker and then specify the Docker Compose executable.

As a result, the Docker Compose option appears in the Configure Remote Python Interpreter dialog box, with the textual message that says which configuration file will be used:

  • If Configuration field

See Also

Reference:

Language and Framework-Specific Guidelines:

Last modified: 29 August 2016