Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to run the docker compose

Tags:

When I run the command docker-compose -f docker-compose.yml up my container starts normally.

In IntelliJ it appears the button to execute the container when the file docker-compose.yml is opened, When I try to upload the container directly through the * .yml file I get the error below:

Failed to deploy 'Compose: docker-compose': Sorry but parent: com.intellij.execution.impl.ConsoleViewImpl[,0,0,1188x368,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=] has already been disposed (see the cause for stacktrace) so the child: com.intellij.util.Alarm@7566093f will never be disposed. 

My docker-compose.yml file:

version: 3.4
services:
    api.logistics-service:
        container_name: logistics-service
        build: ./docker
        ports:
            - "8080:8080"
like image 329
Gabriel Santos Avatar asked Sep 16 '20 21:09

Gabriel Santos


People also ask

What is the correct command to run a docker compose?

Command options overview and help You can also see this information by running docker compose --help from the command line. You can use Docker Compose binary, docker compose [-f <arg>...] [options] [COMMAND] [ARGS...] , to build and manage multiple services in Docker containers.


1 Answers

I had the same problem. A wrong version in docker-compose.yaml caused the error on first startup.
After fixing this it, I was not able to start any docker-compose-services anymore.
Looks like an IntelliJ bug.

In this situation just restart IntelliJ.

like image 76
akop Avatar answered Oct 02 '22 15:10

akop