-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 745 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 745 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
# AWS Lambda container image for Penweb Lambda
# Base image: AWS Lambda Python runtime
FROM public.ecr.aws/lambda/python:3.11
# Ensure Python behaves well in containers
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Set Lambda task root as working directory
WORKDIR ${LAMBDA_TASK_ROOT}
# Copy application source
COPY src ./src
# Make project source importable
ENV PYTHONPATH="${LAMBDA_TASK_ROOT}/src:${PYTHONPATH}"
# Install runtime dependencies needed by the project
# (Kept minimal; adjust as needed if you add more)
RUN python -m pip install --upgrade pip \
&& pip install requests beautifulsoup4 python-dotenv
# Set the Lambda handler (module.function)
CMD ["lambda.entrypoint.lambda_handler"]