Closed szom1 closed 8 months ago
Looks like the package moved to the community
repo. I will fix this.
Thanks for your work.
I have this problem too.
Can you save this font package for good instead of downloading everytime after reboot?
解决方案:
此时请停止容器
下载一个中文字体,如AlibabaPuHuiTi-3-55-Regular.ttf
docker ps
查看jlesage/firefox的容器ID
用下面的命令把字体文件拷贝到容器里:
# docker cp [font file] [CONTAINER ID]:/usr/share/fonts/
docker cp AlibabaPuHuiTi-3-55-Regular.ttf 48aa47cbab16:/usr/share/fonts/
在/usr/share/fonts/
路径下新建一个文件夹cn
,将字体文件移动到cn
文件夹中
/usr/share/fonts/cn/AlibabaPuHuiTi-3-55-Regular.ttf
进入docker中,编辑etc/cont-init.d/10-cjk-font.sh
文件, 在判断中添加|| [ -d /usr/share/fonts/cn]
if [ -d /usr/share/fonts/truetype/wqy ] || [ -d /usr/share/fonts/wenquanyi ] || [ -d /usr/share/fonts/wqy-zenhei ] || [ -d /usr/share/fonts/cn]
then
echo "CJK font already installed."
保存后,重启docker容器即可
Can you save this font package for good instead of downloading everytime after reboot?
Once installed, the package won't be re-installed everytime you restart the container. Only when re-creating the container.
Fixed with the latest version of the image.
Current Behavior
[cont-init ] 10-cjk-font.sh: installing CJK font... [cont-init ] 10-cjk-font.sh: fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: ERROR: unable to select packages: [cont-init ] 10-cjk-font.sh: font-wqy-zenhei (no such package): [cont-init ] 10-cjk-font.sh: required by: world[font-wqy-zenhei] [cont-init ] 10-cjk-font.sh: terminated with error 1.
Expected Behavior
Please fix this issue
Steps To Reproduce
No response
Environment
Container creation
[cont-init ] 10-cjk-font.sh: installing CJK font... [cont-init ] 10-cjk-font.sh: fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz [cont-init ] 10-cjk-font.sh: ERROR: unable to select packages: [cont-init ] 10-cjk-font.sh: font-wqy-zenhei (no such package): [cont-init ] 10-cjk-font.sh: required by: world[font-wqy-zenhei] [cont-init ] 10-cjk-font.sh: terminated with error 1.
Container log
Container inspect
No response
Anything else?
No response