openEuler arm架构如何安装openoffice?

openEuler arm架构如何安装openoffice?

libreoffice官网有
openoffice更新很慢,就用上面的吧

可以参考这个镜像的制作
FROM Harbor

ADD ./LibreOffice_24.8.3_Linux_x86-64_rpm.tar.gz /opt/office
ADD ./LibreOffice_24.8.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz /opt/office

libreoffice安装到了/opt/libreoffice24.8/

RUN rpm -ivh /opt/office/LibreOffice_24.8.3.2_Linux_x86-64_rpm/RPMS/.rpm &&
rpm -ivh /opt/office/LibreOffice_24.8.3.2_Linux_x86-64_rpm_langpack_zh-CN/RPMS/
.rpm &&
rm -rf /opt/office &&
dnf install -y libXinerama-devel libXi-devel libXext-devel libX11-devel fontconfig-devel freetype-devel nss-softokn nspr dbus-libs cairo-devel libxslt-devel pcre2-devel libffi-devel gpgme-devel krb5-devel util-linux selinux-policy-devel libxml2-devel libcurl-devel rasqal-devel gobject-introspection-devel glib2-devel cups java-1.8.0-openjdk net-tools unzip glibc-langpack-zh glibc-locale-source &&
dnf clean all

生成 zh_CN.UTF-8 locale

RUN localedef -i zh_CN -f UTF-8 zh_CN.UTF-8

中文字体

ADD ./SourceHanSerifCN.zip /usr/share/fonts/
RUN unzip /usr/share/fonts/SourceHanSerifCN.zip -d /usr/share/fonts/ &&
rm /usr/share/fonts/SourceHanSerifCN.zip &&
fc-cache -fv &&
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&
echo “Asia/Shanghai” > /etc/timezone

设置环境变量

ENV LC_ALL=“zh_CN.UTF-8”
ENV LANG=“zh_CN.UTF-8”

EXPOSE 8100

启动 LibreOffice 的 headless 模式

CMD nohup /opt/libreoffice24.8/program/soffice --headless --accept=“socket,host=0.0.0.0,port=8100;urp;” --nofirststartwizard &

镜像的测试脚本和命令
docker build -t openeuler:24.03-lts_libreoffice24 .

#这里实验好错误的地方,将命令修订到Dockerfile中,再次构建镜像

echo “测试下镜像,exit 可以退出”

docker run -it --rm --name tmpoffice openeuler:24.03-lts_libreoffice24 bash

cat <<EOF

测试中文和libreoffice的功能

docker cp test.docx tmpoffice:/opt/

docker exec -it tmpoffice bash -c “echo test; /opt/libreoffice24.8/program/soffice --headless --convert-to pdf /opt/test.docx --outdir /opt/”

rm -f ./test.pdf ||true

docker cp tmpoffice:/opt/test.pdf ./

EOF