Added debugging Dockerfile ✨
This commit is contained in:
parent
afe6ad6bfc
commit
c8570d07ef
2 changed files with 17 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
/build
|
||||
/playground
|
||||
glance*.yml
|
||||
/.idea
|
16
Dockerfile.debug
Normal file
16
Dockerfile.debug
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM golang:1.23.1-alpine3.20 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
RUN CGO_ENABLED=0 go build -gcflags="all=-N -l" .
|
||||
|
||||
FROM alpine:3.20
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/glance .
|
||||
COPY --from=builder /go/bin/dlv .
|
||||
|
||||
EXPOSE 2345/tcp 8080/tcp
|
||||
CMD ["./dlv", "--listen=:2345", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "./glance"]
|
Loading…
Add table
Reference in a new issue