Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active January 8, 2021 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sw-samuraj/c9c64667809a64b983d4f5e13a959b1d to your computer and use it in GitHub Desktop.
Save sw-samuraj/c9c64667809a64b983d4f5e13a959b1d to your computer and use it in GitHub Desktop.
An example Docker file for the blog post about Golang remote debugging.
FROM debian:stable-slim
LABEL maintainer="SoftWare Samuraj"
WORKDIR /home/samuraj
# Copy remote-debug app
COPY remote-debug .
# Copy Delve - Golang debugger
COPY bin/dlv .
# CMD ["./remote-debug"]
CMD ["./dlv", "--listen=:2345", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "./remote-debug"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment