Coder Social home page Coder Social logo

Comments (2)

ahhmarr avatar ahhmarr commented on June 5, 2024 3

did you manage to solve the issue?

from compiledaemon.

aligator avatar aligator commented on June 5, 2024 1

I got it working.
the problem is that it doesn't kill delve properly and therefore each re-run starts a new instance.

To prevent that, just pass --graceful-kill and it will kill the debugger propperly:

app:
    command: --build="go build -o /code/App /code/app.go" --graceful-kill --command="dlv exec --accept-multiclient --continue --headless --listen=:2345 --api-version=2 /code/App"
    ports:
      - 2345:2345
    build:
      dockerfile: dev.Dockerfile
      context: .
    volumes:
      - ./:/code
....

RUN go mod download && go mod verify && \
    mkdir -p /code/images && \
    go install github.com/go-delve/delve/cmd/dlv@latest && \
    go install github.com/githubnemo/CompileDaemon@latest

ENV GOOS linux
ENV GOARCH amd64

# port 2345 -> debugger port
EXPOSE 2345

ENTRYPOINT ["CompileDaemon"]

from compiledaemon.

Related Issues (20)

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.