繁体   English   中英

无法使用Goland部署Docker容器-DockerClientException-.eslintrc(无此类文件或目录)

[英]Unable to deploy docker container with Goland - DockerClientException - .eslintrc (No such file or directory)

我正在Docker容器中构建Go应用

当我尝试使用此命令预览在Golang中运行docker容器时

docker build -f Dockerfile.local -t myGoApp:exp . && docker run -v /volume:/go --name myGoApp --env-file ./test.env --network=myGoApp_network myGoApp:exp 

我得到:

Building image...
Failed to deploy 'myGoApp Dockerfile: Dockerfile.local': com.github.dockerjava.api.exception.DockerClientException: Error occurred while preparing Docker context folder.<br/>caused by: java.io.FileNotFoundException: /home/julien/go/src/gitlab.com/xxx/myGoApp/vendor/github.com/influxdata/platform/chronograf/.eslintrc (No such file or directory)

当我在终端上运行相同的命令时,它可以工作

当我通过Goland在docker compose内运行等效项时,它也起作用。

我也检查了一下,并且相关的.eslintrc存在。

为什么会这样呢? 谷歌搜索,我发现它与docker-java有关,但是我真的找不到解决方法。

这是Docker版本信息:

Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        4c52b90
 Built:             Wed Jan  9 19:35:31 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       4c52b90
  Built:            Wed Jan  9 19:02:44 2019
  OS/Arch:          linux/amd64
  Experimental:     false

知道有什么问题吗? 我需要启动它,那是因为我想实现一个容器内调试像解释这里

确保检查卷中是否存在断开的硬链接或符号链接,这些硬链接或符号链接指向主机文件系统上不存在的内容。 如果链接的目标未解析为文件,则不会生成映像。 这是我处理问题时遇到的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM