GithubHelp home page GithubHelp logo

docker-delve's Introduction

Go Delve Image

Source: https://github.com/multi-io/docker-delve

Usually run with the binary to be debugged mounted into the container. You could also copy the dlv binary (which is linked statically) out of the container into the to-be-debugged container, e.g. if you use this image in a K8s InitContainer.

There are two images built from this source: delve and delve-sumo. The former contains only dlv (in a alpine base image, ~25 MB), the latter also contains telepresence, kubectl and other random debugging utils (~950 MB).

IMPORTANT: You need to run the container with --security-opt seccomp:unconfined. Otherwise Delve will abort with could not launch process: fork/exec <binary>: operation not permitted.

Binaries need to be compiled with debugging symbols (-gcflags 'all=-N -l') for Delve to work with them.

Sample invocation, assuming the binary to be debugged is located at output/binary on the host:

docker run --security-opt seccomp:unconfined -v `pwd`/output:/output -p 2345:2345 oklischat/delve --listen=:2345 --headless=true --api-version=2 exec /output/binary -- <arguments>

You should now be able to connect any debugging client running on the host (e.g delve itself, or an IDE like Goland) to the debugged process at localhost:2345.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.