Assume, I want to work on a project which requires a different version of java (any language). Now if I don't want to upgrade JDK on my host machine or do not want to use VMs how can I do active development for the project using docker? It seems like docker is good to package an already coded application and create an image out of it. But does it also provide capability for active development which can prompt any compilation errors etc within the IDE that I am using to write code? Meaning, does docker help create an environment where I can code applications in multiple languages without having to install them on my host machine? And by code I mean not just typing the text in editor, I mean full IDE support with prompts and compilation on the fly.
Asked
Active
Viewed 57 times
-1
-
Docker is not an IDE. The thing Docker actually provides is an isolation system; so on the one hand you can definitely install a different JVM inside a container, but on the other the host system can't see that JVM and the JVM requires extra configuration to see your host code. It can still be useful in a development context, but for what you're describing, a version manager like [jenv](https://www.jenv.be) would be much easier to set up and use. – David Maze Aug 12 '22 at 09:37
-
https://stackoverflow.com/questions/46724661/using-an-ide-while-developing-on-a-docker-container – sharath Aug 12 '22 at 17:02
-
What is "active development" and how does it differ from ... normal development? I do not think this question is salvable and I do not think the answers will help you. It would be better, instead of "guessing" what it does, read the documentation and understand it. The questions are very broad - "how can I use". There is no straight answer - you have to understand what it is and then you can use it. `Does docker provide development environment for code compilation etc?` It's like asking if a car provides milk. The car gets you to the store. – KamilCuk Aug 12 '22 at 17:31
-
@KamilCuk I was trying to compare between containers and VM in the case of writing code. If I want to develop an application which uses a different python version then I can have a VM on my machine, install the required python version, IDE etc and work on it. But can we achieve the same using containers? – sharath Aug 12 '22 at 18:32
1 Answers
1
After digging around a bit and thinking about it. I think the problems Docker tries to solve are more valuable on a production server where you would want your application to just run the same way as it was running on your local host machine during development, and also not mess up any runtimes on the prod server because your application requires certain specific runtime tool versions. For the local development as asked in this question, I think its trivial and can be worked around with VMs etc.

sharath
- 73
- 1
- 1
- 7