2023-12-06 16:29:42 -07:00
|
|
|
FROM golang:latest
|
2023-12-04 15:03:40 -07:00
|
|
|
RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest
|
2023-12-06 16:29:42 -07:00
|
|
|
|
2023-12-04 15:03:40 -07:00
|
|
|
|
2023-12-04 08:37:53 -07:00
|
|
|
WORKDIR /app
|
2023-12-06 16:29:42 -07:00
|
|
|
EXPOSE 10000 4000
|
2023-12-04 08:37:53 -07:00
|
|
|
|
|
|
|
COPY ./main/* ./
|
2023-12-06 16:29:42 -07:00
|
|
|
RUN go get -d github.com/gorilla/mux@latest
|
2023-12-06 16:05:32 -07:00
|
|
|
RUN go mod tidy
|
2023-12-06 16:29:42 -07:00
|
|
|
# ENV GO111MODULE=off
|
2023-12-04 08:37:53 -07:00
|
|
|
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o debug-app .
|
|
|
|
|
2023-12-06 16:05:32 -07:00
|
|
|
CMD [ "/go/bin/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/app/debug-app" ]
|
|
|
|
|