From 734b7da5468b6469ea279c4b93bfc75d7b4106b7 Mon Sep 17 00:00:00 2001 From: Christian Krakau-Louis Date: Tue, 18 Feb 2025 15:33:28 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0fa7291..9fffca5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,12 @@ WORKDIR /app # Copy the source code and directories. COPY . . +# If no go.mod file exists, initialize a Go module. +RUN if [ ! -f go.mod ]; then \ + go mod init github.com/yourusername/dynamic_mitm_server; \ + fi && \ + go mod tidy + # Build the binary. RUN CGO_ENABLED=0 go build -o dynamic_mitm_server .