繁体   English   中英

apk-get 错误 -- 在 aws lambda 图像上找不到命令

[英]apk-get error-- command not found on aws lambda image

我正在尝试构建和上传我的 lambda 容器,但如果在线运行 apt-get --command not found 失败

我也尝试使用Run apk但它也失败并出现错误 --command not found

如何使用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"]

我也试过

  1. 运行 apk但它也失败并出现错误 --command not found
  2. 运行 yum install -y tesseract-ocr-heb 并出现错误 -- 配置的存储库之一失败(未知),#4 1.327 并且 yum 没有足够的缓存数据来继续。

你应该使用 yum package 管理器。

以下是在 OpenSuse 上安装 tesseract 的命令: https://tesseract-ocr.github.io/tessdoc/InstallationOpenSuse.html
添加--nogpgcheck标志以跳过密钥检查。

这是您的 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM