Blogger Information
Blog 291
fans 0
comment 0
visits 352599
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
alpinelinux镜像安装中文字体
Original
907 people have browsed it

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

编辑dockerfile,先切换国内镜像源,默认alpinelinux是国外源,下载包会很慢

  1. vim Dockerfile
  2. FROM alpine:latest
  3. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk add --update ttf-dejavu fontconfig && rm -rf /var/cache/apk/* && mkfontscale && mkfontdir && fc-cache

RUN后面执行命令解释

  1. # 切成国内阿里云源
  2. sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  3. # 安装中文字体
  4. apk add --update ttf-dejavu fontconfig
  5. # 删除安装缓存包
  6. rm -rf /var/cache/apk/*
  7. # 刷新字体
  8. mkfontscale && mkfontdir && fc-cache
  9. # 验证(这个构建好镜像后运行执行)
  10. fc-list

本文转自:https://blog.51cto.com/qingfeng00/5484841

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post