Skip to content

Commit

Permalink
chore: update base image used for the lambda-promtail image (#12454)
Browse files Browse the repository at this point in the history
Signed-off-by: Callum Styan <callumstyan@gmail.com>
  • Loading branch information
cstyan committed Apr 3, 2024
1 parent d39dc09 commit 2951b38
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions tools/lambda-promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
FROM golang:1.21.3-alpine AS build-image

COPY tools/lambda-promtail /src/lambda-promtail
WORKDIR /src/lambda-promtail

FROM golang:1.22.2-alpine AS build-image
# RUN yum install -y golang
RUN apk update && apk add git
RUN go version

RUN apk update && apk upgrade && \
apk add --no-cache bash git

RUN go mod download
RUN go build -o ./main -tags lambda.norpc -ldflags="-s -w" lambda-promtail/*.go


FROM alpine:3.18.5

WORKDIR /app

COPY --from=build-image /src/lambda-promtail/main ./

ENTRYPOINT ["/app/main"]
RUN go env -w GOPROXY=direct
ADD . .
RUN go build -o /main -tags lambda.norpc -ldflags="-s -w" lambda-promtail/*.go
RUN ls -al
# copy artifacts to a clean image
FROM public.ecr.aws/lambda/provided:al2
COPY --from=build-image /main /main
ENTRYPOINT [ "/main" ]

0 comments on commit 2951b38

Please sign in to comment.