0

I need to develop a bunch of Python scripts pulling data from various sources asynchronously and populating a shared database. Everything will eventually run off AWS, while I do my developing locally on a Win10 machine.

To avoid any compatibility issues, I would like to get going with Docker for this project - but I'm not sure how to set up my environment for development. One option I can see might work is using PyCharm and their Docker plugin.

What are the other options? I would like to be able to execute snippets of code directly from the editor in an interactive mode, on the back of a Docker image that I would then be able to deploy on AWS in large numbers.

adrug
  • 101
  • 3
  • 8
  • This may help: https://nickjanetakis.com/blog/configuring-your-code-editor-for-docker. I find VSCode does a good job with syntax highlighting and managing multiple Docker containers in one project [Workspace](https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-vs-code). The Visual Studio Marketplace also has extensions for Docker and .env files which can be installed from within VSCode.. – amanb Feb 03 '19 at 18:54

1 Answers1

1

Docker development can be very productive using either of these two options:

  1. You can map source code volumes into a production image.
    This works in the same way as a normal VM-based development cycle. Be careful with the number/size of your mounts if you aren't developing on Linux.
  2. Optimise your Dockerfile for rebuild efficiency.
    Docker builds can be super fast if you do them carefully. This path is better (or necessary) if you are using swarm because it tends to depend on built images with proper digests.

I have not found the PHPStorm Docker extension very helpful, and I suspect PyCharm would be similar. It is really just a wrapper to basic docker container build|run|ps.

I'm not sure executing code snippets will be that easy, but there might be a way to pipe it into a running container.

Ryan
  • 4,594
  • 1
  • 32
  • 35