mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
25 lines
No EOL
637 B
Docker
25 lines
No EOL
637 B
Docker
FROM public.ecr.aws/lambda/python:3.12
|
|
|
|
# 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/extractor_and_loader/docker/app.py ./
|
|
|
|
# Set Lambda handler
|
|
CMD ["app.handler"] |