Answer the question
In order to leave comments, you need to log in
Is it possible to move the application from Docker to the parent system?
Is it possible to run a container with Java 1.8 and use the java command on the parent system? Likewise with npm, nodejs, etc.
There are no problems with the databases, I forward the port and the client on the parent machine connects via the forwarded port to the database in the container, I'm interested in a similar possibility with applications.
I want to rid the parent OS of various applications like java, npm, nodejs, etc. It also helped solve the problem when projects use different versions of Java or nodejs for example.
Answer the question
In order to leave comments, you need to log in
Is it possible to run a container with Java 1.8 and use the java command on the parent system?
docker attach
docker exec
The whole point of docker is to rid the parent machine of dependencies.
Run all the commands you need inside the docker container, with the right software versions and dependencies.
In general, it is possible, and quite convenient - I use texlive (latexmk, pdflatex), python (notebook), I tried pycharm (etc. - https://github.com/aplavin/dockerfiles). For non-graphical programs, it's usually simple - the desired folder is attached to the container as a volume, for convenience, you can make a script that takes this very folder as an argument and launches what you need. For graphics, you also need to forward the X-server socket, but also, in general, nothing complicated.
True, I did not try it separately with java.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question