Skip to content

Commit

Permalink
feat: 文件在线预览支持更多的文件类型 #2765
Browse files Browse the repository at this point in the history
* feat: 文件在线预览支持更多的文件类型 #2765

1.允许访问preview微服务

* feat: 文件在线预览支持更多的文件类型 #2765

1.更换wqy-zenhei字体下载源

* feat: 文件在线预览支持更多的文件类型 #2765

1.preview镜像构建失败,验证:移除localedef语句,设置编码环境提前

* feat: 文件在线预览支持更多的文件类型 #2765

1.Dockerfile使用基础镜像
  • Loading branch information
liuliaozhong authored Jan 2, 2025
1 parent 434988b commit cf04c4b
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions support-files/kubernetes/images/backend/preview.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,45 +1,7 @@
FROM blueking/jdk:0.0.2
FROM blueking/bk-repo-preview-base:0.0.1

LABEL maintainer="Tencent BlueKing Devops"

# 设置UTF-8编码环境
ENV LANG=zh_CN.utf-8
ENV LC_ALL=zh_CN.utf-8
ENV LC_CTYPE=zh_CN.utf-8
RUN echo "LANG=zh_CN.utf-8" >> /etc/environment

RUN yum -y install ca-certificates && \
yum -y install glibc-common wget bzip2 && \
# 安装必要的字体包
wget https://sourceforge.net/projects/wqy/files/wqy-microhei/0.2.0-beta/wqy-microhei-0.2.0-beta.tar.gz -O /tmp/wqy-microhei.tar.gz && \
mkdir -p /usr/share/fonts/wenquanyi && \
tar -zxvf /tmp/wqy-microhei.tar.gz -C /usr/share/fonts/wenquanyi --strip-components=1 && \
rm -f /tmp/wqy-microhei.tar.gz && \
wget http://wenq.org/daily/zenhei/wqy-zenhei-0.9.47-nightlybuild.tar.gz -O /tmp/wqy-zenhei.tar.gz && \
mkdir -p /usr/share/fonts/wenquanyi && \
tar -zxvf /tmp/wqy-zenhei.tar.gz -C /usr/share/fonts/wenquanyi --strip-components=1 && \
rm -f /tmp/wqy-zenhei.tar.gz && \
wget https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-fonts-ttf-2.37.tar.bz2 -O /tmp/dejavu-fonts.tar.bz2 && \
mkdir -p /usr/share/fonts/dejavu && \
tar -jxvf /tmp/dejavu-fonts.tar.bz2 -C /usr/share/fonts/dejavu --strip-components=1 && \
rm -f /tmp/dejavu-fonts.tar.bz2 && \
yum -y install fontconfig && \
fc-cache -fv && \
# 设置时区
export DEBIAN_FRONTEND=noninteractive && \
yum -y install tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
# 安装 LibreOffice 所需的库
yum -y install libXrender libXinerama libXt libXext libfreetype cairo cups libX11 nss && \
# 清理缓存
yum clean all && \
# 安装LibreOffice
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.1/rpm/x86_64/LibreOffice_7.6.7.1_Linux_x86-64_rpm.tar.gz -O libreoffice_rpm.tar.gz && \
tar -zxf libreoffice_rpm.tar.gz -C /tmp && \
cd /tmp/LibreOffice_7.6.7.1_Linux_x86-64_rpm/RPMS && \
yum -y install *.rpm && \
rm -rf /tmp/* && rm -rf /var/lib/apt/lists/*

ENV BK_REPO_HOME=/data/workspace \
BK_REPO_LOGS_DIR=/data/workspace/logs \
BK_REPO_SERVICE_PREFIX=bkrepo- \
Expand Down

0 comments on commit cf04c4b

Please sign in to comment.