2

I have successfully set up docker-compose to run inside IntelliJ, but when I run the configuration, IntelliJ starts the docker-compose containers, but won't show any logs - even though the container is running properly.

I have set up docker-compose in various other Jetbrains IDEs, and access logs have been visible. What am I doing wrong?enter image description here

enter image description here

2
  • And whey you try docker-compose logs from console do you see anything? Feb 13, 2019 at 19:43
  • which version of Intellij IDEA do you have? Apr 1, 2019 at 15:45

1 Answer 1

1

While you can certainly use the docker-compose logs command mentioned in the comments on the OP's question, there's a better way. At least there is at the time I'm answering, though perhaps not 2 years ago when originally asked.

In any case, if you look at the run job's configuration, you will probably see an option tag named attach: none. You just need to click on the tag's X icon to remove it, as highlighted below.

enter image description here That will cause the logs to be displayed in the same window as the Docker service.

If, however, you wanted to see just one (or more) of the services in your compose file, you could click on the Modify button in the "docker-compose up" heading and add an Attach option with the specific service(s) you wanted.

Now you can see exactly what you want.

This particular example was done on JetBrains' WebStorm IDE, but recent IntelliJ versions should prove no different.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.