2022-05-26 00:48:55 +02:00
|
|
|
FROM public.ecr.aws/lambda/python:3.8
|
2022-05-26 17:10:29 +02:00
|
|
|
RUN yum -y update
|
2022-05-26 00:48:55 +02:00
|
|
|
RUN yum -y install git && yum clean all
|
|
|
|
RUN yum -y install tar gzip zlib freetype-devel \
|
|
|
|
gcc \
|
|
|
|
ghostscript \
|
|
|
|
lcms2-devel \
|
|
|
|
libffi-devel \
|
|
|
|
libimagequant-devel \
|
|
|
|
libjpeg-devel \
|
|
|
|
libraqm-devel \
|
|
|
|
libtiff-devel \
|
|
|
|
libwebp-devel \
|
|
|
|
make \
|
|
|
|
openjpeg2-devel \
|
|
|
|
rh-python36 \
|
|
|
|
rh-python36-python-virtualenv \
|
|
|
|
sudo \
|
|
|
|
tcl-devel \
|
|
|
|
tk-devel \
|
|
|
|
tkinter \
|
|
|
|
which \
|
|
|
|
xorg-x11-server-Xvfb \
|
|
|
|
zlib-devel \
|
|
|
|
&& yum clean all
|
|
|
|
RUN pip install -U --force-reinstall pillow-simd
|
|
|
|
RUN pip install requests
|
|
|
|
|
|
|
|
|
|
|
|
# Copy function code
|
|
|
|
COPY __init__.py ${LAMBDA_TASK_ROOT}/app.py
|
|
|
|
|
|
|
|
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
|
|
|
|
CMD [ "app.lambda_handler" ]
|