Sign inSign up

docker1001/ff-tomcat

By docker1001

•Updated almost 3 years ago

FROM tomcat:8.5.47

Image
0

29

docker1001/ff-tomcat repository overview

FROM tomcat:8.5.47

此镜在上面的基础上
1、添加了LibreOffice_7.1.4.2_Linux_x86-64_deb.tar.gz
2、添加了 unoconv-0.8.2.tar.gz
3、没有字体,启动容器后需要手动添加

⁠Dockerfile
# /usr/local/tomcat
# /usr/local/openjdk-8

# 基础镜像,可以选择合适的 Tomcat 版本
FROM tomcat:8.5.47




RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list

RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list


# 将当前路径下的 fonts.zip 拷贝到容器内部
# COPY winfonts.zip /tmp/
# 解压字体文件
# RUN unzip -j /tmp/winfonts.zip -d /usr/share/fonts/
# 刷新字体缓存
# RUN fc-cache -fv

# 如果不想镜像太大,也可以注释上面的, 容器运行后再手动添加镜像
# docker cp winfonts.zip ff-apaas:/tmp/
# docker exec -it ff-apaas /bin/bash
# unzip -j /tmp/winfonts.zip -d /usr/share/fonts/
# unzip /tmp/winfonts.zip -d /usr/share/fonts/
# fc-cache -f -v


# 执行更新
RUN apt-get update
# 安装 LibreOffice 的所有依赖
RUN apt -y install libreoffice-base

# 安装 dpkg,以便处理 Debian 软件包
# RUN apt-get update && apt-get install -y dpkg

# 复制 LibreOffice Debian 压缩包到容器内
COPY LibreOffice_7.1.4.2_Linux_x86-64_deb.tar.gz /tmp/
# 解压 LibreOffice Debian 压缩包
RUN tar -xzvf /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb.tar.gz -C /tmp/
# 安装 LibreOffice Debian 软件包
RUN dpkg -i /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb/DEBS/*.deb

# 安装 unoconv
# 安装 python3
RUN apt-get install -y python3 python3-pip
COPY unoconv-0.8.2.tar.gz /tmp/
RUN tar -xzvf /tmp/unoconv-0.8.2.tar.gz -C /tmp/
RUN cd /tmp/unoconv-0.8.2 && python3 setup.py install


# 清理不需要的文件
RUN rm -rf /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb.tar.gz /tmp/unoconv-0.8.2.tar.gz /tmp/fonts.zip

# 添加其他自定义配置,如挂载卷、设置环境变量等

Tag summary

Content type

Image

Digest

sha256:41d28d041…

Size

1.2 GB

Last updated

almost 3 years ago

docker pull docker1001/ff-tomcat:8.5.47