Reputation: 17
I am trying to build and upload my lambda container,but if fails on line RUN apt-get --command not found
I also tried with Run apk but it fails too with error --command not found
How can I install my package with public.ecr.aws/lambda/python:3.7 ?
FROM public.ecr.aws/lambda/python:3.7
WORKDIR /code
COPY . .
COPY policy.xml /etc/ImageMagick-6
RUN pip install -r requirements.txt
RUN apt-get update && apt install -y tesseract-ocr-heb
RUN apt-get -y install ghostscript
EXPOSE 80
CMD ["app.lambda_handler"]
I also tried with
Upvotes: 0
Views: 1455
Reputation: 4289
You should use yum package manager.
Here are the commands for installing tesseract on OpenSuse:
https://tesseract-ocr.github.io/tessdoc/InstallationOpenSuse.html
add --nogpgcheck
flag to skip key check.
Here is how your dockerfile should look like:
FROM public.ecr.aws/lambda/python:3.7
RUN yum install -y yum-utils
RUN yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/Alexander_Pozdnyakov/RHEL_7/
RUN yum update
RUN yum install -y tesseract --nogpgcheck
RUN yum install -y tesseract-langpack-heb --nogpgcheck
WORKDIR /code
COPY . .
COPY policy.xml /etc/ImageMagick-6
RUN yum install -y ghostscript
RUN pip install -r requirements.txt
EXPOSE 80
CMD ["app.lambda_handler"]
Upvotes: 1