6

Say we have a Docker container with all the dependencies that our application needs, and the code for the application lives on a shared volume. This seems to be a common setup to reasonably isolate the application and its dependencies.

Now say we edit the code located on the shared volume using a locally installed IDE. How can the IDE find the dependencies (which are not installed on the shared volume) for features such as auto-completion to work?

I'm aware of certain IDEs such as PyCharm that has built-in support for Docker but I'm curious if there is another method for "sharing" dependencies. Do some people just NFS mount the whole container onto the host or does that go against the Docker philosophy?

  • The general concept of Docker and other isolation concept for development (Vagrant, virtual environments) is the ability to repeat the creation of the isolated environment. This happens via `Dockerfile`, `Vagrantfile` or `requirements.txt`. Trying to share a development environment among developers usually results in chaos. – Klaus D. Jun 25 '17 at 18:00
  • "and the code for the application lives on a shared volume" - I disagree, this is not a common idiom for using containers. The Docker image you build _is_ the application. It should contain your application the dependencies required to run it. When you store the application outside the image you no longer gain this benefit and are just using Docker more like a virtual machine. – Andy Shinn Jun 25 '17 at 18:11
  • @AndyShinn, I believe that the asker is referring to mount the application code during development into the container, overriding the built application. That is a common idiom. Note that he says: "Now say we edit the code located on the shared volume using a locally installed IDE". – Robert Jun 25 '17 at 20:03

0 Answers0