[英]apk-get error-- command not found on aws lambda image
I am trying to build and upload my lambda container,but if fails on line RUN apt-get --command not found我正在尝试构建和上传我的 lambda 容器,但如果在线运行 apt-get --command not found 失败
I also tried with Run apk but it fails too with error --command not found我也尝试使用Run apk但它也失败并出现错误 --command not found
How can I install my package with public.ecr.aws/lambda/python:3.7 ?如何使用public.ecr.aws/lambda/python:3.7安装我的 package?
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我也试过
You should use yum package manager.你应该使用 yum package 管理器。
Here are the commands for installing tesseract on OpenSuse: https://tesseract-ocr.github.io/tessdoc/InstallationOpenSuse.html以下是在 OpenSuse 上安装 tesseract 的命令: https://tesseract-ocr.github.io/tessdoc/InstallationOpenSuse.html
add --nogpgcheck
flag to skip key check.添加
--nogpgcheck
标志以跳过密钥检查。
Here is how your dockerfile should look like:这是您的 dockerfile 的样子:
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"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.