Files
doczyai-pipelines/release/Dockerfile
T
Katon Minhas 70ca9c7236 Merged in Katon-Minhas/dockerfile-edited-online-with-bitbucket-1762462810542 (pull request #763)
Dockerfile edited online with Bitbucket

Approved-by: Sha Brown
2025-11-06 21:01:50 +00:00

27 lines
646 B
Docker

# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.12
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION} AS build
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install poetry
WORKDIR /app
COPY pyproject.toml .
COPY poetry.lock .
RUN --mount=type=cache,target=/root/.cache/pip \
poetry install --only main --compile
COPY . ${LAMBDA_TASK_ROOT}
CMD [ "index.lambda_handler" ]