运行命令docker-compose -f docker-compose.yml up
时,我的容器正常启动。
在IntelliJ中,当文件docker-compose.yml打开时,出现执行容器的按钮。当我尝试直接通过* .yml文件上传容器时,出现以下错误:
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.
我的docker-compose.yml文件:
version: 3.4
services:
api.logistics-service:
container_name: logistics-service
build: ./docker
ports:
- "8080:8080"
答案 0 :(得分:4)
我遇到了同样的问题。 docker-compose.yaml
中的错误版本导致首次启动时出错。
修复此问题后,我无法再启动任何 docker-compose-services。
看起来像一个 IntelliJ 错误。
在这种情况下只需重启 IntelliJ。