Skip to content

Commit 940977a

Browse files
committed
Small Dockerfile.lambda fixups
1 parent 5438bbd commit 940977a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile.lambda

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Fetch or build all required binaries
2-
FROM golang:1.21 as builder
2+
FROM golang:1.21-bookworm as builder
33

44
ARG VERSION_REF
55
RUN test -n "${VERSION_REF}"
66

77
ENV SRC github.com/segmentio/kubeapply
88

9-
RUN apt-get update && apt-get install --yes \
9+
RUN apt-get update && apt-get install --no-install-recommends --yes \
1010
curl \
1111
unzip \
1212
wget
@@ -16,24 +16,21 @@ RUN cd /usr/local/bin && /go/src/${SRC}/scripts/pull-deps.sh
1616

1717
WORKDIR /go/src/${SRC}
1818

19-
ENV CGO_ENABLED=1
20-
ENV GO111MODULE=on
21-
2219
RUN make kubeapply VERSION_REF=${VERSION_REF} && \
2320
cp build/kubeapply /usr/local/bin
2421
RUN make kubeapply-lambda VERSION_REF=${VERSION_REF} && \
2522
cp build/kubeapply-lambda /usr/local/bin
2623

27-
# Copy into final image
24+
# Copy into final image from builder
2825
FROM public.ecr.aws/lambda/provided:al2
2926

3027
RUN yum install -y git unzip
3128

3229
# Not sure if awscli is needed for running lambda, but keeping it here for now
3330
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
34-
&& unzip awscliv2.zip \
35-
&& ./aws/install \
36-
&& rm -rf aws awscliv2.zip
31+
&& unzip awscliv2.zip \
32+
&& ./aws/install \
33+
&& rm -rf aws awscliv2.zip
3734

3835
COPY --from=builder \
3936
/usr/local/bin/aws-iam-authenticator \

0 commit comments

Comments
 (0)