我的图片:public.ecr.aws/lambda/python:3.9(我只使用它,因为这个里面有 yum)
Docker 文件:
FROM public.ecr.aws/lambda/python:3.9
# Install Mono runtime
RUN rpm --import https://download.mono-project.com/repo/xamarin.gpg && \
curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo && \
yum install -y mono-complete && yum clean all
RUN yum install -y libreoffice && yum clean all
无论如何,我没有 libreoffice 的 yum 存储库。 如果有人这样做过,我想找到解决方案
还尝试过:
# Install yum-utils for yum-config-manager
RUN yum install -y yum-utils && yum clean all
# Add libreoffice repository and install
RUN yum-config-manager --add-repo http://download.opensuse.org/repositories/LibreOffice:/7.0/CentOS_7/ && \
rpm --import http://download.opensuse.org/repositories/LibreOffice:/7.0/CentOS_7/repodata/repomd.xml.key && \
yum install -y libreoffice && yum clean all