-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathDockerfile.rie
More file actions
30 lines (21 loc) · 832 Bytes
/
Dockerfile.rie
File metadata and controls
30 lines (21 loc) · 832 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
27
28
29
30
FROM python:3.9-alpine
RUN apk add --no-cache libstdc++ curl
# Install RIE
RUN curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie && \
chmod +x /usr/local/bin/aws-lambda-rie
# Install native wheel dependency first
ADD native-wheels/*.whl /tmp/native/
RUN pip install /tmp/native/*.whl
# Add the pre-built wheel
ADD build-artifacts/*.whl /tmp/
# Install the wheel
RUN pip install /tmp/*.whl
# Copy test handler
COPY tests/integration/test-handlers/echo/app.py /var/task/app.py
# Set environment for local testing
ENV AWS_LAMBDA_RUNTIME_API="127.0.0.1:8080"
ENV LAMBDA_TASK_ROOT="/var/task"
ENV _HANDLER="app.handler"
WORKDIR /var/task
ENTRYPOINT ["/usr/local/bin/aws-lambda-rie"]
CMD ["python", "-m", "awslambdaric", "app.handler"]