-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 800 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 800 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
26
# ===============================
# -------- Build Stage --------
FROM debian:bookworm-slim AS build
# Install any build dependencies
RUN apt-get update && apt-get install -y build-essential curl libcurl4-openssl-dev libssl-dev
# Build your Lambda function
COPY src .
RUN g++ -std=c++17 main.cpp -o bootstrap
# ===============================
# -------- Runtime Stage --------
FROM debian:bookworm-slim
# Install minimal runtime dependencies
RUN apt-get update && apt-get install -y libstdc++6 libcurl4 libssl3 && rm -rf /var/lib/apt/lists/*
# AWS expects an executable with path /var/runtime/bootstrap
COPY --from=build /bootstrap /var/runtime/bootstrap
# Ensure it is executable
RUN chmod +x /var/runtime/bootstrap
# Set the custom runtime entrypoint
ENTRYPOINT ["/var/runtime/bootstrap"]