当尝试运行Docker Compose时出错。

huangapple go评论67阅读模式
英文:

Error when trying to run the docker compose

问题

当我运行命令docker-compose -f docker-compose.yml up时,我的容器正常启动。

在IntelliJ中,当打开docker-compose.yml文件时,会出现执行容器的按钮,但当我尝试通过*.yml文件直接上传容器时,我会收到以下错误:

无法部署 'Compose: docker-compose':很抱歉,但父级:com.intellij.execution.impl.ConsoleViewImpl[,0,0,1188x368,无效,布局=java.awt.BorderLayout,对齐X=0.0,对齐Y=0.0,边框=,标志=9,最大尺寸=,最小尺寸=,首选尺寸=] 已被处理(有关堆栈跟踪的原因)因此子级:com.intellij.util.Alarm@7566093f永远不会被处理。

我的docker-compose.yml文件:

version: 3.4
services:
    api.logistics-service:
        container_name: logistics-service
        build: ./docker
        ports:
            - "8080:8080"
英文:

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"

答案1

得分: 4

我遇到了同样的问题。在 docker-compose.yaml 中有一个错误的版本,导致了第一次启动时出错。在修复了这个问题后,我再也无法启动任何 docker-compose 服务了。看起来像是 IntelliJ 的一个 bug。

在这种情况下,只需重新启动 IntelliJ。

英文:

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.

huangapple
  • 本文由 发表于 2020年9月17日 05:42:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/63928330.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定