aboutsummaryrefslogtreecommitdiffstats
path: root/debug/dockerfile-debug
diff options
context:
space:
mode:
Diffstat (limited to 'debug/dockerfile-debug')
-rw-r--r--debug/dockerfile-debug14
1 files changed, 14 insertions, 0 deletions
diff --git a/debug/dockerfile-debug b/debug/dockerfile-debug
new file mode 100644
index 0000000..296ab31
--- /dev/null
+++ b/debug/dockerfile-debug
@@ -0,0 +1,14 @@
+FROM golang:alpine as build
+
+WORKDIR /
+
+COPY . .
+
+RUN CGO_ENABLED=0 go install github.com/go-delve/delve/cmd/dlv@latest
+#RUN CGO_ENABLED=0 go get -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv
+RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o ./app ./cmd/dbasik-api
+
+FROM scratch
+COPY --from=build /go/bin/dlv /dlv
+COPY --from=build /app /app
+CMD ["/dlv"]