[root@ur-test-docker alpine-glibc-fonts]# cat Dockerfile
FROM bytest-harbor.ur.com.cn/base-image/alpine-glibc:3.14
RUN apk --no-cache add ca-certificates wget && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-bin-2.34-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-i18n-2.34-r0.apk && \
apk add glibc-bin-2.34-r0.apk glibc-i18n-2.34-r0.apk glibc-2.34-r0.apk && \
rm -rfv glibc-bin-2.34-r0.apk glibc-i18n-2.34-r0.apk glibc-2.34-r0.apk
COPY ./locale.md /locale.md
RUN cat locale.md | xargs -i /usr/glibc-compat/bin/localedef -i {} -f UTF-8 {}.UTF-8 && \
rm -rfv locale.md && \
/usr/glibc-compat/bin/localedef -i zh_CN -f UTF-8 zh_CN.UTF-8
ENV LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CH.UTF-8
[root@ur-test-docker alpine-glibc-fonts]#
[root@ur-test-docker jre]# cat Dockerfile-font
FROM bytest-harbor.ur.com.cn/base-image/jre1.8.0_201:latest
RUN echo -e 'https://mirrors.aliyun.com/alpine/v3.6/main/\nhttps://mirrors.aliyun.com/alpine/v3.6/community/' > /etc/apk/repositories \
&& apk update \
&& apk upgrade \
&& apk --no-cache add ttf-dejavu fontconfig && rm -rf /var/cache/apk/*
[root@ur-test-docker jre]#
[root@ur-test-docker alpine-glibc-weirunanyaheiti]# cat Dockerfile
FROM bytest-harbor.ur.com.cn/base-image/jre1.8.0_201:v0.01
COPY WeiRuanYaHei.ttf /usr/share/fonts/WeiRuanYaHei.ttf
RUN apk add --update ttf-dejavu fontconfig && rm -rf /var/cache/apk/*
[root@ur-test-docker alpine-glibc-weirunanyaheiti]#
字体下载
https://www.fonts.net.cn/font-30931224951.html