-
Notifications
You must be signed in to change notification settings - Fork 387
Expand file tree
/
Copy pathDockerfile.rie
More file actions
25 lines (19 loc) · 893 Bytes
/
Dockerfile.rie
File metadata and controls
25 lines (19 loc) · 893 Bytes
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
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}"
ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie /usr/local/bin/aws-lambda-rie
RUN chmod +x /usr/local/bin/aws-lambda-rie
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" ]