FROM 086679231553.dkr.ecr.us-east-1.amazonaws.com/docker-parent-images:lambda-python311

# Cached natively if unchanged.
COPY requirements.txt .

# Requirements will only reinstall if they have changed.
RUN pip install --upgrade pip
RUN pip install setuptools wheel
RUN pip install -r requirements.txt

COPY install-ffmpeg.sh ./install-ffmpeg.sh
USER root
RUN sh install-ffmpeg.sh
USER worker

COPY index.py config.py ./
COPY constants ./constants

CMD ["index.handler"]
