Fix Debug Docker File
This commit is contained in:
parent
4647bfce1b
commit
a7ba34dee8
@ -1,13 +1,14 @@
|
|||||||
FROM golang:alpine
|
FROM golang:latest
|
||||||
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest
|
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest
|
||||||
# RUN CGO_ENABLED=0 go get -d github.com/gorilla/mux@latest
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80 4000
|
EXPOSE 10000 4000
|
||||||
|
|
||||||
COPY ./main/* ./
|
COPY ./main/* ./
|
||||||
|
RUN go get -d github.com/gorilla/mux@latest
|
||||||
RUN go mod tidy
|
RUN go mod tidy
|
||||||
ENV GO111MODULE=off
|
# ENV GO111MODULE=off
|
||||||
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o debug-app .
|
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" ]
|
CMD [ "/go/bin/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/app/debug-app" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user