Rich editors in a Docker development environment Rich editors in a Docker development environment python python

Rich editors in a Docker development environment


You should use an 'advanced' IDE like IntelliJ (Pycharm) and configure a remote Python SDK using SSH-Access to your App-Docker-Container (using a shared ssh-key to auth against the app-container with a preinstalled openssh server and preconfigured authorized_keys file).You can share this SDK information in your project file with all devs, so they wlll have this setup out of the box

1) This will ensure, your IDE knows about all the python libs/symbols available/installed in your docker-container during runtime. It will also enable you to properly debug remotely at the same time

2) This ensures, you have an IDE at your hand including a lot of important additional features like the inspector, 3way duff, search in path.. . hardly any of the Browser-Based IDEs will catch up with Pycharm at this point IMHO

Of course, as already mentioned in the comments, you need to share aka mount your code into the container. On linux, you plainly use host-volume-mounts from your local src folder to the container.

On OSX, you will run into performance issues when using host mounts. You might use something like http://docker-sync.io ( i am biased - there are also a lot of other similar tools )


I know this is an old question, but as I stumbled across it while trying to see what other editors might offer in this space, I would like to point out Visual Studio Code's notion of a Dev Container, which seems to provide the best level of integration I've seen for this so far. I'm hoping to see this turn into an industry trend myself.


Could use x11docker

  • x11docker allows to run graphical desktop applications (and entire desktops) in Docker Linux containers.
  • Docker allows to run applications in an isolated container environment. Containers need much less resources than virtual machines for similar tasks.
  • Docker does not provide a display server that would allow to run applications with a graphical user interface.
  • x11docker fills the gap. It runs an X display server on the host system and provides it to Docker containers.
  • Additionally x11docker does some security setup to enhance container isolation and to avoid X security leaks. This allows a sandbox environment that fairly well protects the host system from possibly malicious or buggy software.
  1. https://github.com/mviereck/x11docker
  2. https://github.com/mviereck/x11docker/wiki (extensive! knowledge)
  3. https://dev.to/brickpop/my-dream-come-true-launching-gui-docker-sessions-with-dx11-in-seconds-1a53