16 lines
469 B
Docker
16 lines
469 B
Docker
FROM golang:latest
|
|
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest
|
|
|
|
|
|
WORKDIR /app
|
|
EXPOSE 10000 4000
|
|
|
|
COPY ./main/* ./
|
|
RUN go get -d github.com/gorilla/mux@latest
|
|
RUN go mod tidy
|
|
# 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" ]
|
|
|