survey-extraction/deployment/lambda/lambda_example/docker/Dockerfile
2025-11-28 19:36:49 +00:00

26 lines
No EOL
668 B
Docker

# AWS Lambda python pacakge
FROM public.ecr.aws/lambda/python:3.11
# Install Poetry (you could pin a version if you like)
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add Poetry to PATH
ENV PATH="/root/.local/bin:$PATH"
# Set working directory
WORKDIR /var/task
# Copy Poetry files first to leverage Docker layer caching
COPY pyproject.toml poetry.lock README.md ./
COPY etl/ etl/
# Install dependencies into /var/task
RUN poetry config virtualenvs.create false \
&& poetry install --only main --no-interaction --no-ansi
# Copy app code
COPY deployment/lambda/lambda_example/docker/app.py ./
# Set the CMD to your handler
CMD ["app.handler"]