dqjl0906 2019-01-25 12:07
浏览 409

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

I am building a go app inside a docker container

When I try to run a docker container inside Golang with this command preview

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

I get:

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)

When I run the same command on a terminal, it works

When I run the equivalent inside a docker compose via Goland, it also works.

I also checked, and the .eslintrc in question exists.

Why is it happening ? Googling, I could find that it has to do with docker-java, but I could not really find a way to solution.

Here is docker version info:

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

Any idea what's wrong ? I need to launch it that way because I want to implement debugging inside a container like explained here

  • 写回答

1条回答 默认 最新

  • drbxr86044 2019-04-10 02:28
    关注

    Make sure to check the volume for broken hard links or symlinks to things that don't exist on your host file system. It won't build the image if the destination of the links do not resolve to a file. This was my issue when I was dealing with it.

    评论

报告相同问题?

悬赏问题

  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计