Eclipse - Docker integration

前端 未结 5 1595
一个人的身影
一个人的身影 2021-02-14 07:15

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 Co

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-14 07:29

    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 :/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.

提交回复
热议问题