docker - 在 docker 容器中运行 delve - debug.test:没有这样的文件或目录
问题描述
当尝试从现有项目的 docker 容器中运行 delve 时,我们得到了这个:
API server listening at: [::]:4040
could not launch process: fork/exec /go/src/github.com/marcosvpj/rey/debug.test: no such file or directory
could not remove /go/src/github.com/marcosvpj/rey/debug.test: remove /go/src/github.com/marcosvpj/rey/debug.test: no such file or directory
尝试在一个全新的项目中运行,使用相同的 Dockerfile,一切正常。寻找文件 - debug.test - 在两个容器中都找不到。
有人知道我需要寻找什么吗?
我得到的最接近的是在常见问题解答中,它表明需要在 docker run 中使用 --security-opt=seccomp:unconfined 。不是这个,因为两个项目都已经在 docker run 命令中有这个
码头工人运行命令:
docker run --security-opt=seccomp:unconfined --rm --net="host" -e LOGGER_LEVEL='error' -v `pwd`:/go/src/github.com/marcosvpj/rey -w /go/src/github.com/marcosvpj/rey rey ./hack/check.sh
解决方案
推荐阅读
- php - Curl 扩展在 Docker 中失败,出现错误“CURL_OPENSSL_3 not found”
- javascript - Rails 5 - 根据先前的 collection_select 更改 collection_select 的表单值
- react-native - 是否有可能在 react-native 的抽屉导航器中嵌套选项卡导航器?
- java - Spring AccessDeniedException 中的自定义消息
- java - 泛型方法是否可以从您传递给它的类型中调用方法
- r - 是否可以确定一行中的最大值是否唯一?
- css - 更改材质滑块拇指大小
- amazon-web-services - 无法从浏览器访问具有弹性 IP 地址的 AWS EC2 实例
- javascript - laravel ajax 返回 500(内部服务器错误)
- c# - 如何在 C# 中为我的不同属性创建动态结构?