From bcc93c49cbd1ff0f593fe63f43fe84e376edd7da Mon Sep 17 00:00:00 2001 From: maddalax Date: Sun, 22 Sep 2024 22:43:09 -0500 Subject: [PATCH] ok will this work... --- examples/todo-list/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/todo-list/Dockerfile b/examples/todo-list/Dockerfile index d19fd92..426cd90 100644 --- a/examples/todo-list/Dockerfile +++ b/examples/todo-list/Dockerfile @@ -16,17 +16,14 @@ RUN go get github.com/maddalax/htmgo/framework@latest # Copy the source code into the container COPY . . -RUN CGO_ENABLED=1 GOOS=linux go build -o ./dist -a -ldflags '-linkmode external -extldflags "-static"' . - # Build the Go binary for Linux RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build -RUN ls +RUN CGO_ENABLED=1 GOOS=linux go build -o ./dist -a -ldflags '-linkmode external -extldflags "-static"' . -RUN cd dist && ls # Stage 2: Create the smallest possible image -FROM golang:1.23 +FROM gcr.io/distroless/base-debian11 # Set the working directory inside the container WORKDIR /app