Files
pretendo-docker/patches/splatoon-secure/dockerize.patch
2024-06-30 20:17:40 -03:00

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"]