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 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘