From 008b855655106fde78dbdf39acd6e1c853bf829c Mon Sep 17 00:00:00 2001 From: Suhaib Date: Sat, 12 Oct 2024 21:21:19 -0700 Subject: [PATCH] Changes to Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 61b2c41..b7bac10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,12 @@ WORKDIR /src # Copy the Go source code to the builder container COPY . . +# Set environment variables for cross-compilation +ENV CGO_ENABLED=1 +ENV GOOS=linux + # Build the Go application -RUN CGO_ENABLED=1 GOOS=linux go build -o SuhaibMessageQueue +RUN go build -o SuhaibMessageQueue # Stage 2: Create the final image FROM alpine:latest