Docker镜像安装宋体

阅读 181

2022-06-28

参考文章
​Linux 安装字体库-宋体

FROM centos:centos7.6.1810
MAINTAINER 运维@小兵

COPY simhei.ttf /opt
COPY simsun.ttc /opt
RUN yum -y install ttmkfdir && yum clean all && \
mkdir -p /usr/share/fonts/chinese && mv /opt/{simhei.ttf,simsun.ttc} /usr/share/fonts/chinese/ && \
chmod -R 755 /usr/share/fonts/chinese && ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir && \
sed -i '25a \\t<dir>/usr/share/fonts/chinese</dir>' /etc/fonts/fonts.conf && fc-cache


精彩评论(0)

0 0 举报