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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.