Setting up Java + svn + Eclipse+ Tomcat , development environment with docker

born :

I just started to tryout docker to see if it helps setting up our development environment , which consists of

  1. Jdk 1.6
  2. Eclipse
  3. RabbitVCS
  4. Tomcat
  5. MySQL server

Our Development desktops are mostly Ubuntu 16.04 . I would have eclipse, RabbitVCS installed on host and the rest in container .

If every thing goes well , developers should be able to download a Docker image . Running that image should give them JDK , Tomcat and MySQL server . Developers can then start using RabbitVCS to check out projects .

Is this feasible with Docker ?

so-random-dude :

tl;dr

It is not feasible to run eclipse in host OS and use JDK/JRE runs in a container because eclipse has a dependency on JRE. Similarly you cannot have tomcat in one container and JRE/JDK in another container because tomcat needs JRE to run.

Explanation

I would have eclipse, RabbitVCS installed on host and the rest in container....... Running that image should give them JDK , Tomcat and MySQL server

Are you trying to use JDK running on a docker container (and Eclipse IDE running on host os) for active development? If that is the case, it not not feasible (arguable, you can do remote debugging; but remember, debugging is very different than active development) . And it is not the intend of docker. While developing, your developers may need to have JDK installed in their host machine itself. In your case, only sensible thing to run from container is mysql as you don't have any active development there.

Edit: To build a portable development environment

In docker-land, one possible solution is, have eclipse+jdk+tomcat in the same docker image and mount the X11 socket into the container so that you can expose eclipse GUI running in the container to your host OS

More read here: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/

Or just ditch Docker and go to full-blown VM like virtualbox, you might be able to find pre-built images with eclipse in it (not sure), or you can build one after installing all the required packages on a base image and share it amongst your developers.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=436009&siteId=1