22 lines
794 B
Docker
22 lines
794 B
Docker
FROM public.ecr.aws/lambda/python:3.11
|
|
|
|
# Install ffmpeg static binary
|
|
RUN yum install -y tar xz && \
|
|
curl -L https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -o /tmp/ffmpeg.tar.xz && \
|
|
tar -xf /tmp/ffmpeg.tar.xz -C /tmp && \
|
|
cp /tmp/ffmpeg-*-amd64-static/ffmpeg /usr/local/bin/ffmpeg && \
|
|
cp /tmp/ffmpeg-*-amd64-static/ffprobe /usr/local/bin/ffprobe && \
|
|
rm -rf /tmp/ffmpeg* && \
|
|
yum clean all
|
|
|
|
# Install Python dependencies
|
|
COPY ctrl/lambda/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY task/lambda_handler.py ${LAMBDA_TASK_ROOT}/task/lambda_handler.py
|
|
COPY task/__init__.py ${LAMBDA_TASK_ROOT}/task/__init__.py
|
|
COPY core/ ${LAMBDA_TASK_ROOT}/core/
|
|
|
|
CMD ["task.lambda_handler.handler"]
|