mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-10-03 07:17:34 -05:00
24 lines
606 B
Diff
24 lines
606 B
Diff
diff --git c/Dockerfile i/Dockerfile
|
|
new file mode 100644
|
|
index 0000000..d2d087b
|
|
--- /dev/null
|
|
+++ i/Dockerfile
|
|
@@ -0,0 +1,17 @@
|
|
+FROM golang:alpine AS builder
|
|
+WORKDIR /build
|
|
+
|
|
+RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
|
+
|
|
+COPY go.* ./
|
|
+RUN go mod download
|
|
+
|
|
+COPY . ./
|
|
+RUN go build -gcflags "all=-N -l" -v -o server
|
|
+
|
|
+FROM alpine:latest AS runner
|
|
+WORKDIR /app
|
|
+
|
|
+COPY --from=builder /build/server /app/server
|
|
+COPY --from=builder /go/bin/dlv /app/
|
|
+CMD ["/app/dlv", "exec", "/app/server", "--listen=:2350", "--headless", "--api-version=2", "--log", "--accept-multiclient", "--continue"]
|