From 8a80e43c9ba8b442180662ef4bee311cb6275c75 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 3 Apr 2024 16:12:36 -0700 Subject: [PATCH] image is failing to build in CI, maybe this will fix it Signed-off-by: Callum Styan --- tools/lambda-promtail/Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/lambda-promtail/Dockerfile b/tools/lambda-promtail/Dockerfile index a42aaf826b28c..4cb51bcbe84dd 100644 --- a/tools/lambda-promtail/Dockerfile +++ b/tools/lambda-promtail/Dockerfile @@ -1,11 +1,17 @@ FROM golang:1.22.2-alpine AS build-image -# RUN yum install -y golang -RUN apk update && apk add git + +COPY tools/lambda-promtail /src/lambda-promtail +WORKDIR /src/lambda-promtail + RUN go version -RUN go env -w GOPROXY=direct -ADD . . -RUN go build -o /main -tags lambda.norpc -ldflags="-s -w" lambda-promtail/*.go + +RUN apk update && apk upgrade && \ + apk add --no-cache bash git +RUN go version + RUN ls -al +RUN go mod download +RUN go build -o /main -tags lambda.norpc -ldflags="-s -w" lambda-promtail/*.go # copy artifacts to a clean image FROM public.ecr.aws/lambda/provided:al2 COPY --from=build-image /main /main