gpt4 book ai didi

docker - 无法使用 Goland 部署 docker 容器 - DockerClientException - .eslintrc(没有这样的文件或目录)

转载 作者:IT王子 更新时间:2023-10-29 01:46:46 25 4
gpt4 key购买 nike

我正在 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

知道哪里出了问题吗?我需要以这种方式启动它,因为我想像解释的那样在容器内实现调试 here

最佳答案

确保检查卷中是否存在损坏的硬链接(hard link)或指向主机文件系统上不存在的内容的符号链接(symbolic link)。如果链接的目标未解析为文件,它将不会构建图像。当我处理它时,这是我的问题。

关于docker - 无法使用 Goland 部署 docker 容器 - DockerClientException - .eslintrc(没有这样的文件或目录),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54365069/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com