首先感谢任何帮助
我想在容器中执行Gocode,但是当我尝试在容器中执行时,我收到以下错误:
[root@ping-app-3618687774-abqmo ping-app]# go run main.go
start check_server
INFO[0000] http.startHttpServer ok, listening 0.0.0.0:8080 source="api.go:106"
INFO[0000] Index=ipdata exists=true source="elastic.go:164"
INFO[0000] Index=ipdata Type=entity exists=true source="elastic.go:184"
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
fork/exec : no such file or directory
我无法理解为什么会发生这种情况,而且只发生在docker中,但是当我在主机上运行Gocode时就可以了。
Environment :
Centos: 7.0.1406
Kubernetes: 1.2.0
docker: 1.10.3
非常感谢任何建议。
答案 0 :(得分:1)
答案 1 :(得分:-2)
你也应该复制fork / exec。 在您的go代码中,您正在读取fork / exec,并且在容器内找不到它,因此导致此错误。