From ac5c11dff002e03f028ee7004b0e156eef9ed0b9 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 17 Mar 2026 11:27:44 -0700 Subject: [PATCH] Update dockerfile for new version --- Dockerfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9908069..9d3c908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ -FROM golang:1.25-alpine AS builder +# FROM golang:1.25-alpine AS builder +FROM public.ecr.aws/docker/library/golang:1.25-alpine AS builder + +# Install git and ca-certificates +RUN apk --no-cache add ca-certificates git tzdata # Set the working directory inside the container WORKDIR /app @@ -13,21 +17,16 @@ RUN go mod download COPY . . # Build the application -RUN CGO_ENABLED=0 GOOS=linux go build -o /olm +ARG VERSION=dev +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X main.olmVersion=${VERSION}" -o /olm -# Start a new stage from scratch -FROM alpine:3.23 AS runner +FROM public.ecr.aws/docker/library/alpine:3.23 AS runner -RUN apk --no-cache add ca-certificates +RUN apk --no-cache add ca-certificates tzdata iputils -# Copy the pre-built binary file from the previous stage and the entrypoint script COPY --from=builder /olm /usr/local/bin/ COPY entrypoint.sh / RUN chmod +x /entrypoint.sh - -# Copy the entrypoint script ENTRYPOINT ["/entrypoint.sh"] - -# Command to run the executable CMD ["olm"] \ No newline at end of file