From 7731b9ae50cb5bbd3e7984fceddeab57636065f9 Mon Sep 17 00:00:00 2001 From: bdnugget <1001337108312v3@gmail.com> Date: Wed, 18 Sep 2024 22:17:25 +0200 Subject: [PATCH] YOLO Dockerfile to see if Coolify eats it --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3311d31 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# Use the official Go 1.23 image as the build stage +FROM golang:1.23 as build + +# Set the working directory to /app +WORKDIR /app + +# Copy the Go mod files +COPY go.mod go.sum ./ + +# Download the dependencies +RUN go mod download + +# Copy the application code +COPY . . + +# Build the application +RUN go build -o main cmd/main.go + +# Use the scratch image as the runtime stage +FROM scratch + +# Copy the built application from the build stage +COPY --from=build /app/main /main + +# Expose the port +EXPOSE 1337 + +# Run the command to start the application +CMD ["/main"] \ No newline at end of file