Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add note about DOCKER_DEFAULT_PLATFORM while debugging on mac #3708

Open
indera opened this issue Apr 20, 2024 · 1 comment
Open

add note about DOCKER_DEFAULT_PLATFORM while debugging on mac #3708

indera opened this issue Apr 20, 2024 · 1 comment

Comments

@indera
Copy link

indera commented Apr 20, 2024

This is more a PSA ticket - if we consider it useful let's add it to the docs.

If you are debugging on macOS (m1-2) and you set this env variable

export DOCKER_DEFAULT_PLATFORM=linux/amd64

then the remote debugger will connect to the code running in a container but will not let the program start

full_bin = "dlv exec --listen=:40000 --headless=true --log=true --accept-multiclient --api-version=2 --continue /tmp/main"

Related SO article:
https://stackoverflow.com/questions/65612411/forcing-docker-to-use-linux-amd64-platform-by-default-on-macos

@aarzilli
Copy link
Member

As far as I know this doesn't let you debug either. Unless docker (or rather whatever emulator they use) fixed something debugging a program running under emulation will not work. And, to be honest, even if it did I'd be reluctant to recommend that people do something we aren't testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants