I'm a little stuck... I'm trying to get Delve to run in my docker container but it keeps exiting with the same error:
could not launch process: fork/exec /my/project/__debug_bin: function not implemented
When I've used Delve in other projects this __debug_bin file was created automatically by Delve and then removed after the debugging finished. But here it looks like it's not creating it?
Anyone know why or what I can do to debug this debugger further and find out the cause?
Here's the relevant part of my Dockerfile and docker-compose.yml:
Dockerfile Delve installation
RUN go get github.com/go-delve/delve/cmd/dlv
RUN go mod vendor
RUN go install -gcflags="all=-N -l" -ldflags "-X main.version=$BUILD_VERSION" ./cmd/billing
docker-compose.yml
billing:
image: my/image
restart: unless-stopped
depends_on:
db:
condition: service_healthy
volumes:
- .:/my/project/path
ports:
- "${DEV_ENV_HOST:-0.0.0.0}:9800:9800" # main app port
- "${DEV_ENV_HOST:-0.0.0.0}:40000:40000" # debugger port
And here's my delve command:
dlv debug --headless --listen=:40000 --api-version=2 --accept-multiclient --check-go-version=false ./cmd/billing
I can't think of what else to try to get this to work...