-
Notifications
You must be signed in to change notification settings - Fork 398
Expand file tree
/
Copy pathDockerfile.rie
More file actions
37 lines (30 loc) · 1.18 KB
/
Copy pathDockerfile.rie
File metadata and controls
37 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM public.ecr.aws/lambda/provided:al2023
RUN dnf install -y gcc
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
ARG TARGETARCH
ENV RIE_VERSION=1.36 \
RIE_SHA256_AMD64=ba57f2683260127135ad5ba9bafea141f90492143cbaeb9312cde6dae8d1c08e \
RIE_SHA256_ARM64=7826415f278663274e279085ff96d7c9da210a30213fa72279e56e59f028ce76 \
RIE_PATH=/usr/local/bin/aws-lambda-rie
COPY scripts/download-rie.sh /tmp/download-rie.sh
RUN sh /tmp/download-rie.sh \
"${TARGETARCH}" \
"${RIE_VERSION}" \
"${RIE_SHA256_AMD64}" \
"${RIE_SHA256_ARM64}" \
"${RIE_PATH}" \
&& rm /tmp/download-rie.sh
ARG EXAMPLE=basic-lambda
COPY Cargo.* /build/
COPY lambda-runtime /build/lambda-runtime
COPY lambda-runtime-api-client /build/lambda-runtime-api-client
COPY lambda-events /build/lambda-events
COPY lambda-http /build/lambda-http
COPY lambda-extension /build/lambda-extension
COPY examples/${EXAMPLE} /build/examples/${EXAMPLE}
WORKDIR /build/examples/${EXAMPLE}
RUN cargo build --release
RUN cp target/release/${EXAMPLE} ${LAMBDA_RUNTIME_DIR}/bootstrap
ENTRYPOINT []
CMD [ "/usr/local/bin/aws-lambda-rie", "/var/runtime/bootstrap" ]