GoLand debugging using Docker Run target on Apple Silicon


Description very similar to this post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/8930827840018-delve-no-such-file-or-directory-

In Event Log I get next error:

Error running 'Debug Dockerfile': Can't run process: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"/tmp/4fdd1674-9844-48b7-a208-8cb8a4ffc162/dlv\": stat /tmp/4fdd1674-9844-48b7-a208-8cb8a4ffc162/dlv: no such file or directory: unknown

Before that I got this one:

Can't run process: Status 500: Mounts denied: 
			The path /Applications/GoLand.app/Contents/plugins/go/lib/dlv/linuxarm is not shared from the host and is not known to Docker.
			You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing

I followed recommendation and added `/Applications/GoLand.app/` as additional file sharing path and result is first error above.

I checked container /tmp directory and can see three uuid folders, but nothing in them, so apparently dlv shipped with GoLand has not been mounted along with sources. 

Seems permissions issues, but how to get it work?


Could you please share your Debug Dockerfile?


I've used sample Dockerfile from support article mentioned on related post. 

Currently I manged to get it working. Unfortunatelly I can't provide exact solution, but delve debugger was successfuly mounted after OS restart


Also I had further problems but fixed them fast: if you use alpine images, you must include gcompat package to have delve worked. `RUN apk add gcompat`