Docker Compose with multi module (and containers) project

Answered

Hi,

i just worked my way through this https://www.jetbrains.com/help/idea/2016.3/docker.html and other guides / blog posts about how to use the docker plugin. I played around a bit with single test application containers and simple docker-compose scenarios but besides the issues about connecting to unix:///var/run/docker.sock on macOS i'm not quite sure if its possible to realize the scenario i'm looking for...

I have a multi-module maven project where the single modules are all runnable microservice applications containing their own Dockerfile, so in production every module will be a containerized application. The parent project, which contains the child-modules only contains the parent pom.xml and the docker-compose.yml...

Is it possible (or will it be possible in the future) to use the docker plugin to integrate/configure and start this docker-compose.yml which will start all the child module application containers and give me the possibility to debug the started applications?

Versions: IntelliJ IDEA 2016.3.4, Docker integration Plugin 2.4.1

 

0
4 comments
Avatar
Permanently deleted user

nobody? :(

0

Responsible developer is on the vacation at the moment, I've asked him to reply. He should be back next week. Sorry for the delay.

1
Avatar
Permanently deleted user

Ah ok, no problem, he should enjoy his vacation :)

0
Hello, sorry for delay, just back from vacation. 
 
With the current IDEA Docker integration plugin it should be possible to choose a docker-compose.yml as the deployment in the Docker run configuration.
When the run configuration is started, docker-compose is run and corresponding docker-compose node is displayed in the Docker toolwindow, with the created services and containers shown as the sub-nodes. So you may view logs and perform other operations with the individual containers. Have you tried this kind of Docker run configuration?
 
 
Regarding the debug, it depends on configuration of a particular container, so the best we can do is to ask for a debug port exposed by a container, which is configured by you to accept the debug connection, and than start the debug session on the run configuration start. This is actually possible for a single-container (non-compose) Docker run configuration. 
 
We can copy the same functionality to the compose Docker run configuration. Do you think, it would be enough to ask for a debug port of a single container, so single debug session will be started? I don't quite understand the scenario with multiple debug sessions, could you please expand in this? 
 
 
0

Please sign in to leave a comment.