10

I'm looking for a way to integrate Docker containers with the Eclipse platform. I would like to run all build/test/debug command inside containers and use same containers in Continuous Integration build and later in production.

The simplest way I looked on, was just to configure custom command but besides permissions problem (docker must run as sudo/root) it doesn't give me all the flexibility of real integration.

Any ideas on the best way to proceed?

Pini Reznik
  • 1,360
  • 1
  • 12
  • 15
  • I don't use Eclipse a lot, but I know Docker very well; can you give more details about what works/doesn't work? Thanks! – jpetazzo Oct 29 '13 at 14:19
  • @PiniReznik - Were you able to make any progress on this or have any "lessons learned"? If so, I'd love to hear about it, as I'm also interested in Docker integration with Eclipse. – superEb Feb 06 '14 at 23:03
  • nothing really. It was more of the general wish. I would like to be able to run compilation or tests in a container seamlessly but I don't really want to write my own Eclipse plugin. – Pini Reznik Feb 08 '14 at 15:17

5 Answers5

3

it is not a full answer to your question but we (JBoss Tools team) started working on this and here are a few blogs about what is possible todo today and where we are with Eclipse docker tooling.

http://tools.jboss.org/blog/2015-03-02-getting-started-with-docker-and-wildfly.html

http://tools.jboss.org/blog/2015-03-03-docker-and-wildfly-2.html

http://tools.jboss.org/blog/2015-03-30-Eclipse_Docker_Tooling.html

Max Rydahl Andersen
  • 2,819
  • 2
  • 19
  • 23
2

To do that, i think you work on a Linux platform :-)

What i do for a classic java project :

  • Build a Docker image that contains a jdk and maven for example
  • In Eclipse, via "Run Configurations", create a "build in Docker" configuration that launch a command like this :
    docker run --rm -v <eclipse_workspace_dir>:/usr/src/myapp -w /usr/src/myapp myrepo/myimage mvn clean install

it should work.

For your continuous integration, you can use Docker Jenkins plugin to do the same or with a sh script.

bwilcox
  • 639
  • 1
  • 6
  • 14
1

There is Docker Tooling for Eclipse, available from this update site (you also need to add this update site as for now).

thSoft
  • 19,314
  • 5
  • 82
  • 97
1

Try Eclipse-Che https://eclipse.org/che/ You can install it as a Docker runs.

Atmega
  • 101
  • 4
-1

enter image description hereThese links were very useful to me :

https://github.com/docker/labs/blob/master/developer-tools/java-debugging/Eclipse-README.md

https://github.com/docker/labs/blob/master/developer-tools/java/chapters/ch07-eclipse.adoc

https://docs.docker.com/samples/

It is all about Tutorial: Debugging Java Applications in Docker, Install Docker Tooling in Eclipse You can also Watch a quick video explaining the key steps in https://www.youtube.com/watch?v=XmhEZiS26os

To configure remote debugging in Eclipse, click on Run > Debug Configurations...

Tomcat for instance supports remote debugging the Java Platform Debugger Architecture (JPDA). Make sure that the remote debugging was enabled when the tomcat image (registration-webserver) was built.

benito
  • 481
  • 5
  • 11
  • 2
    A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted.](//stackoverflow.com/help/deleted-answers) – Bugs Jun 01 '17 at 11:56