You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything works fine, however if I try to add --platform linux/amd64 as a build option (I need to add it for some reason), the debugging not working, when I place a breakpoint and run the debugger it becomes gray, and when I hover over it I see "input/output" error message
These are the last messages I see in the logs:
# Compile stage
FROM golang:1.21 AS build-env
RUN go install github.com/go-delve/delve/cmd/dlv@latest
ADD . /dockerdev
WORKDIR /dockerdev
RUN go build -gcflags="all=-N -l" -o /server
# Final stage
FROM ubuntu:22.04
RUN mkdir -p /tmp/log
EXPOSE 8089 40000
WORKDIR /
COPY --from=build-env /go/bin/dlv /
COPY --from=build-env /server /
CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "--log","--log-dest", "/tmp/log/dlv", "--log-output", "debugger,rpc,dap", "exec", "/server"]
What version of Delve are you using (dlv version)?
Version: 1.22.0
What version of Go are you using? (go version)?
go version go1.21.5 linux/amd64
What operating system and processor architecture are you using?
Host machine is apple silicon m1 (darwin/arm64), docker machine is pulled from ubuntu:20.04 (linux/amd64)
What did you do?
Tried to debug go app inside a docker container when image built with --platform linux/amd64, running on apple M1
What did you expect to see?
The breakpoint to hit
What did you see instead?
Breakpoint becomes gray, and debugger is not working
The text was updated successfully, but these errors were encountered:
It used to be that it wasn't possible at all to start delve inside an amd64 docker container running under arm64. It looks like they have made some progress but not enough. This is a docker bug.
I followed this tutorial to debug a go application inside a docker container:
https://blog.jetbrains.com/go/2020/05/06/debugging-a-go-application-inside-a-docker-container/
Everything works fine, however if I try to add
--platform linux/amd64
as a build option (I need to add it for some reason), the debugging not working, when I place a breakpoint and run the debugger it becomes gray, and when I hover over it I see "input/output" error messageThese are the last messages I see in the logs:
Dockerfile:
What version of Delve are you using (
dlv version
)?Version: 1.22.0
What version of Go are you using? (
go version
)?go version go1.21.5 linux/amd64
What operating system and processor architecture are you using?
Host machine is apple silicon m1 (darwin/arm64), docker machine is pulled from ubuntu:20.04 (linux/amd64)
What did you do?
Tried to debug go app inside a docker container when image built with
--platform linux/amd64
, running on apple M1What did you expect to see?
The breakpoint to hit
What did you see instead?
Breakpoint becomes gray, and debugger is not working
The text was updated successfully, but these errors were encountered: