Is it possible to configure docker container settings for the console?

I'm using python interpreter from inside a docker container and I am able to create tests configurations from edit run configuration dialogue box. In these configurations I can specify `Docker container settings` to use a separate network driver for the container. 



Is it possible to use similar configurations in settings -> Build, execution, deployment -> Console -> Python Console? I am able to connect the python console in PyCharm to python interpreter inside the container but I'm not able to specify the network driver so that the container can access the database communicating on the same network. 

Comment actions Permalink

Unfortunately there's currently no such feature, but we already had such request:

You're welcome to follow, vote and comment.

As a workaround, I can suggest an option "run with python console" which should be in the run configuration (please see the screenshot), but it seems for some reason it's not in your case:

What version do you run? If it's not the latest, please try updating (

"Run with python console" will leave the python session open after execution, so you can continue your testing there.

Comment actions Permalink

Thank you Andrey. I will try this solution. I have also followed and upvoted the issue you linked. 



Comment actions Permalink

HI @Andrey Resler,

Unfortunately, when using the box Run with Python console, the docker settings are not used, at least on my side the volume is not mounted.



Please sign in to leave a comment.