Model/backend/postcode_splitter/handler/Dockerfile
2026-02-09 21:32:26 +00:00

26 lines
647 B
Docker

FROM public.ecr.aws/lambda/python:3.11
# Set working directory (Lambda task root)
WORKDIR /var/task
COPY backend/postcode_splitter/handler/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy necessary files for database and utility imports
COPY utils/ utils/
COPY backend/ backend/
# Copy the handler
COPY backend/postcode_splitter/main.py .
# Ensure __init__.py files exist for proper module importing
RUN touch backend/__init__.py
RUN touch backend/app/__init__.py
RUN touch backend/db/__init__.py
RUN touch backend/postcode_splitter/__init__.py
RUN touch utils/__init__.py
# Lambda handler
CMD ["main.handler"]