11 lines
437 B
Docker
11 lines
437 B
Docker
|
FROM golang:alpine
|
||
|
WORKDIR /app
|
||
|
EXPOSE 80 4000
|
||
|
|
||
|
COPY ./main/* ./
|
||
|
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest
|
||
|
RUN go install github.com/gorilla/mux
|
||
|
ENV GO111MODULE=off
|
||
|
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o debug-app .
|
||
|
|
||
|
CMD [ "/go/bin/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/app/debug-app" ]
|