Skip to content

Commit bf83a08

Browse files
gitchenjhklboke
authored andcommitted
优化:构建镜像使用阿里云yum源,加速构建
1 parent 7601d49 commit bf83a08

1 file changed

Lines changed: 30 additions & 26 deletions

File tree

Dockerfile

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,36 @@ FROM centos:centos7.6.1810
22
MAINTAINER chenjh "842761733@qq.com"
33
ADD jodconverter-web/target/kkFileView-*.tar.gz /opt/
44
COPY fonts/* /usr/share/fonts/chienes/
5-
RUN yum install -y kde-l10n-Chinese &&\
6-
yum install -y glibc-common &&\
7-
yum install -y fontconfig &&\
8-
yum install -y mkfontscale &&\
9-
localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 &&\
10-
echo "LANG=zh_CN.UTF-8" > /etc/locale.conf &&\
11-
source /etc/locale.conf &&\
12-
export LANG=zh_CN.UTF-8 &&\
13-
LANG="zh_CN.UTF-8" &&\
14-
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
15-
yum install -y java-1.8.0-openjdk.x86_64 &&\
16-
yum install -y wget &&\
17-
yum install -y libXext.x86_64 &&\
18-
yum groupinstall -y "X Window System" &&\
19-
cd /tmp &&\
20-
wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz -cO openoffice_rpm.tar.gz &&\
21-
tar zxf /tmp/openoffice_rpm.tar.gz &&\
22-
cd /tmp/zh-CN/RPMS &&\
23-
rpm -Uvih *.rpm &&\
24-
rpm -Uvih desktop-integration/openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm &&\
25-
rm -f /tmp/openoffice_rpm.tar.gz &&\
26-
rm -rf /tmp/zh-CN &&\
27-
cd /usr/share/fonts/chienes &&\
28-
mkfontscale &&\
29-
mkfontdir &&\
30-
fc-cache -fv
5+
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup &&\
6+
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo &&\
7+
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo &&\
8+
yum makecache &&\
9+
yum install -y kde-l10n-Chinese &&\
10+
yum install -y glibc-common &&\
11+
yum install -y fontconfig &&\
12+
yum install -y mkfontscale &&\
13+
localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 &&\
14+
echo "LANG=zh_CN.UTF-8" > /etc/locale.conf &&\
15+
source /etc/locale.conf &&\
16+
export LANG=zh_CN.UTF-8 &&\
17+
LANG="zh_CN.UTF-8" &&\
18+
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
19+
yum install -y java-1.8.0-openjdk.x86_64 &&\
20+
yum install -y wget &&\
21+
yum install -y libXext.x86_64 &&\
22+
yum groupinstall -y "X Window System" &&\
23+
cd /tmp &&\
24+
wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz -cO openoffice_rpm.tar.gz &&\
25+
tar zxf /tmp/openoffice_rpm.tar.gz &&\
26+
cd /tmp/zh-CN/RPMS &&\
27+
rpm -Uvih *.rpm &&\
28+
rpm -Uvih desktop-integration/openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm &&\
29+
rm -f /tmp/openoffice_rpm.tar.gz &&\
30+
rm -rf /tmp/zh-CN &&\
31+
cd /usr/share/fonts/chienes &&\
32+
mkfontscale &&\
33+
mkfontdir &&\
34+
fc-cache -fv
3135
ENV LANG zh_CN.UTF-8
3236
ENV LC_ALL zh_CN.UTF-8
3337
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-2.2.0-SNAPSHOT/bin

0 commit comments

Comments
 (0)