Comments (13)
I guess you meant the ENABLE_CJK_FONT
environment variable?
This problem has already been fixed. Are you using the latest version of the container image ?
from docker-firefox.
Yes.I meant the ENABLE_CJK_FONT environment.
The docker version is 24.01.1. I thought that is the latest version.
The error msg is "
stdout: [cont-init ] 15-cjk-font.sh: executing...
stdout: [cont-init ] 15-cjk-font.sh: installing CJK font...
stdout: [cont-init ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
".
My device is R68s CPU:RK3568
from docker-firefox.
What is the complete log? There is no error in what you provided.
from docker-firefox.
The log is end with "stdout: [cont-init ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz"
And the docker can not display the UI .
When I Remove ENABLE_CJK_FONT environment.The docker can run and display the UI.
from docker-firefox.
Can the machine running the container access https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz ?
from docker-firefox.
I know this.
Once when I was executing docker compose up -d
, I met the
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz is the ERROR
this error.
But I didn't care at that time, so I didn't save the logs.
And now I can't reproduce the error, the error disappeared, I guess it was a network problem.
About the ENABLE_CJK_FONT
environment variable,
when I enable it, firefox cannot access, but docker container is running, port is open
This is docker-compose.yml
version: '3'
services:
firefox:
container_name: firefox-1
ports:
- '5800:5800'
volumes:
- './config:/config:rw'
environment:
- LANG=zh_CN.UTF-8
- KEEP_APP_RUNNING=1
- ENABLE_CJK_FONT=1
- SECURE_CONNECTION=1
- VNC_PASSWORD=123456
image: jlesage/firefox`
container logs
[init ] container is starting...
[cont-env ] loading container environment variables...
[cont-env ] APP_NAME: loading...
[cont-env ] APP_VERSION: loading...
[cont-env ] DISPLAY: executing...
[cont-env ] DISPLAY: terminated successfully.
[cont-env ] DISPLAY: loading...
[cont-env ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env ] DOCKER_IMAGE_VERSION: loading...
[cont-env ] GTK2_RC_FILES: executing...
[cont-env ] GTK2_RC_FILES: terminated successfully.
[cont-env ] GTK2_RC_FILES: loading...
[cont-env ] GTK_THEME: executing...
[cont-env ] GTK_THEME: terminated successfully.
[cont-env ] GTK_THEME: loading...
[cont-env ] HOME: loading...
[cont-env ] QT_STYLE_OVERRIDE: executing...
[cont-env ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env ] QT_STYLE_OVERRIDE: loading...
[cont-env ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env ] XDG_CACHE_HOME: loading...
[cont-env ] XDG_CONFIG_HOME: loading...
[cont-env ] XDG_DATA_HOME: loading...
[cont-env ] XDG_RUNTIME_DIR: loading...
[cont-env ] XDG_STATE_HOME: loading...
[cont-env ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init ] executing container initialization scripts...
[cont-init ] 10-certs.sh: executing...
[cont-init ] 10-certs.sh: generating DH parameters (2048 bits), this is going to take a long time...
[cont-init ] 10-certs.sh: generating self-signed certificate for WEB server...
[cont-init ] 10-certs.sh: generating self-signed certificate for VNC server...
[cont-init ] 10-certs.sh: terminated successfully.
[cont-init ] 10-check-app-niceness.sh: executing...
[cont-init ] 10-check-app-niceness.sh: terminated successfully.
[cont-init ] 10-clean-logmonitor-states.sh: executing...
[cont-init ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init ] 10-clean-tmp-dir.sh: executing...
[cont-init ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init ] 10-fontconfig-cache-dir.sh: executing...
[cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init ] 10-init-users.sh: executing...
[cont-init ] 10-init-users.sh: terminated successfully.
[cont-init ] 10-nginx.sh: executing...
[cont-init ] 10-nginx.sh: terminated successfully.
[cont-init ] 10-openbox.sh: executing...
[cont-init ] 10-openbox.sh: terminated successfully.
[cont-init ] 10-pkgs-mirror.sh: executing...
[cont-init ] 10-pkgs-mirror.sh: terminated successfully.
[cont-init ] 10-set-tmp-dir-perms.sh: executing...
[cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init ] 10-vnc-password.sh: executing...
[cont-init ] 10-vnc-password.sh: creating VNC password file from environment variable...
[cont-init ] 10-vnc-password.sh: terminated successfully.
[cont-init ] 10-web-data.sh: executing...
[cont-init ] 10-web-data.sh: terminated successfully.
[cont-init ] 10-x11-unix.sh: executing...
[cont-init ] 10-x11-unix.sh: terminated successfully.
[cont-init ] 10-xdg-runtime-dir.sh: executing...
[cont-init ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init ] 15-cjk-font.sh: executing...
[cont-init ] 15-cjk-font.sh: installing CJK font...
[cont-init ] 15-cjk-font.sh: fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
This is the entire log. It feels like the font is not loaded and the container is stuck here.
When I disable ENABLE_CJK_FONT
, firefox can only be accessed.
This is the log after disable ENABLE_CJK_FONT
[init ] container is starting...
[cont-env ] loading container environment variables...
[cont-env ] APP_NAME: loading...
[cont-env ] APP_VERSION: loading...
[cont-env ] DISPLAY: executing...
[cont-env ] DISPLAY: terminated successfully.
[cont-env ] DISPLAY: loading...
[cont-env ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env ] DOCKER_IMAGE_VERSION: loading...
[cont-env ] GTK2_RC_FILES: executing...
[cont-env ] GTK2_RC_FILES: terminated successfully.
[cont-env ] GTK2_RC_FILES: loading...
[cont-env ] GTK_THEME: executing...
[cont-env ] GTK_THEME: terminated successfully.
[cont-env ] GTK_THEME: loading...
[cont-env ] HOME: loading...
[cont-env ] QT_STYLE_OVERRIDE: executing...
[cont-env ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env ] QT_STYLE_OVERRIDE: loading...
[cont-env ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env ] XDG_CACHE_HOME: loading...
[cont-env ] XDG_CONFIG_HOME: loading...
[cont-env ] XDG_DATA_HOME: loading...
[cont-env ] XDG_RUNTIME_DIR: loading...
[cont-env ] XDG_STATE_HOME: loading...
[cont-env ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init ] executing container initialization scripts...
[cont-init ] 10-certs.sh: executing...
[cont-init ] 10-certs.sh: terminated successfully.
[cont-init ] 10-check-app-niceness.sh: executing...
[cont-init ] 10-check-app-niceness.sh: terminated successfully.
[cont-init ] 10-clean-logmonitor-states.sh: executing...
[cont-init ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init ] 10-clean-tmp-dir.sh: executing...
[cont-init ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init ] 10-fontconfig-cache-dir.sh: executing...
[cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init ] 10-init-users.sh: executing...
[cont-init ] 10-init-users.sh: terminated successfully.
[cont-init ] 10-nginx.sh: executing...
[cont-init ] 10-nginx.sh: terminated successfully.
[cont-init ] 10-openbox.sh: executing...
[cont-init ] 10-openbox.sh: terminated successfully.
[cont-init ] 10-pkgs-mirror.sh: executing...
[cont-init ] 10-pkgs-mirror.sh: terminated successfully.
[cont-init ] 10-set-tmp-dir-perms.sh: executing...
[cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init ] 10-vnc-password.sh: executing...
[cont-init ] 10-vnc-password.sh: creating VNC password file from environment variable...
[cont-init ] 10-vnc-password.sh: terminated successfully.
[cont-init ] 10-web-data.sh: executing...
[cont-init ] 10-web-data.sh: terminated successfully.
[cont-init ] 10-x11-unix.sh: executing...
[cont-init ] 10-x11-unix.sh: terminated successfully.
[cont-init ] 10-xdg-runtime-dir.sh: executing...
[cont-init ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init ] 15-cjk-font.sh: executing...
[cont-init ] 15-cjk-font.sh: terminated successfully.
[cont-init ] 15-install-pkgs.sh: executing...
[cont-init ] 15-install-pkgs.sh: terminated successfully.
[cont-init ] 55-check-snd.sh: executing...
[cont-init ] 55-check-snd.sh: sound not supported: device /dev/snd not exposed to the container.
[cont-init ] 55-check-snd.sh: terminated successfully.
[cont-init ] 55-firefox.sh: executing...
[cont-init ] 55-firefox.sh: generating machine-id...
[cont-init ] 55-firefox.sh: terminated successfully.
[cont-init ] 56-firefox-set-prefs-from-env.sh: executing...
[cont-init ] 56-firefox-set-prefs-from-env.sh: terminated successfully.
[cont-init ] 85-take-config-ownership.sh: executing...
[cont-init ] 85-take-config-ownership.sh: terminated successfully.
[cont-init ] 89-info.sh: executing...
╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
│ │
│ Application: Firefox │
│ Application Version: 120.0.1-r0 │
│ Docker Image Version: 24.01.1 │
│ Docker Image Platform: linux/arm64 │
│ │
╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init ] 89-info.sh: terminated successfully.
[cont-init ] all container initialization scripts executed.
[init ] giving control to process supervisor.
[supervisor ] loading services...
[supervisor ] loading service 'default'...
[supervisor ] loading service 'app'...
[supervisor ] loading service 'gui'...
[supervisor ] loading service 'certsmonitor'...
[supervisor ] loading service 'nginx'...
[supervisor ] loading service 'xvnc'...
[supervisor ] loading service 'openbox'...
[supervisor ] loading service 'logmonitor'...
[supervisor ] service 'logmonitor' is disabled.
[supervisor ] loading service 'logrotate'...
[supervisor ] all services loaded.
[supervisor ] starting services...
[supervisor ] starting service 'xvnc'...
[xvnc ] Xvnc TigerVNC 1.13.1 - built Dec 21 2023 00:53:28
[xvnc ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc ] Underlying X server release 12014000
[xvnc ] Fri Mar 8 15:36:52 2024
[xvnc ] vncext: VNC extension running!
[xvnc ] vncext: Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc ] vncext: created VNC server for screen 0
[supervisor ] starting service 'nginx'...
[nginx ] Listening for HTTPs connections on port 5800.
[supervisor ] starting service 'openbox'...
[supervisor ] starting service 'app'...
[supervisor ] all services started.
[app ] Mozilla Firefox 120.0.1
[xvnc ] Fri Mar 8 15:37:02 2024
[xvnc ] Connections: accepted: /tmp/vnc.sock
[xvnc ] SConnection: Client needs protocol version 3.8
[xvnc ] SConnection: Client requests security type VncAuth(2)
But Chinese is still confusing, then I tried a way
docker cp SourceHanSansOLD-Medium-2.otf 0529caefcb3a:/usr/share/fonts
I copied a Chinese font into the container and it worked.
from docker-firefox.
Can the machine running the container access https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz ?
OK. It's just a network problem. I can download fonts after setting up a proxy for firefox. I think this is a problem unique to mainland China......
from docker-firefox.
You can also use the PACKAGES_MIRROR
environment variable to specify a different Alpine repo to use.
from docker-firefox.
还可以使用环境变量指定要使用的其他 Alpine 存储库。
PACKAGES_MIRROR
Fine, I thought I wouldn't need the mirror source......
from docker-firefox.
还可以使用环境变量指定要使用的其他 Alpine 存储库。
PACKAGES_MIRROR
Uh...did I write the PACKAGES_MIRROR
environment variable wrong?
docker logs firefox-1
[init ] container is starting...
[cont-env ] loading container environment variables...
[cont-env ] APP_NAME: loading...
[cont-env ] APP_VERSION: loading...
[cont-env ] DISPLAY: executing...
[cont-env ] DISPLAY: terminated successfully.
[cont-env ] DISPLAY: loading...
[cont-env ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env ] DOCKER_IMAGE_VERSION: loading...
[cont-env ] GTK2_RC_FILES: executing...
[cont-env ] GTK2_RC_FILES: terminated successfully.
[cont-env ] GTK2_RC_FILES: loading...
[cont-env ] GTK_THEME: executing...
[cont-env ] GTK_THEME: terminated successfully.
[cont-env ] GTK_THEME: loading...
[cont-env ] HOME: loading...
[cont-env ] QT_STYLE_OVERRIDE: executing...
[cont-env ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env ] QT_STYLE_OVERRIDE: loading...
[cont-env ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env ] XDG_CACHE_HOME: loading...
[cont-env ] XDG_CONFIG_HOME: loading...
[cont-env ] XDG_DATA_HOME: loading...
[cont-env ] XDG_RUNTIME_DIR: loading...
[cont-env ] XDG_STATE_HOME: loading...
[cont-env ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init ] executing container initialization scripts...
[cont-init ] 10-certs.sh: executing...
[cont-init ] 10-certs.sh: generating DH parameters (2048 bits), this is going to take a long time...
[cont-init ] 10-certs.sh: generating self-signed certificate for WEB server...
[cont-init ] 10-certs.sh: generating self-signed certificate for VNC server...
[cont-init ] 10-certs.sh: terminated successfully.
[cont-init ] 10-check-app-niceness.sh: executing...
[cont-init ] 10-check-app-niceness.sh: terminated successfully.
[cont-init ] 10-clean-logmonitor-states.sh: executing...
[cont-init ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init ] 10-clean-tmp-dir.sh: executing...
[cont-init ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init ] 10-fontconfig-cache-dir.sh: executing...
[cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init ] 10-init-users.sh: executing...
[cont-init ] 10-init-users.sh: terminated successfully.
[cont-init ] 10-nginx.sh: executing...
[cont-init ] 10-nginx.sh: terminated successfully.
[cont-init ] 10-openbox.sh: executing...
[cont-init ] 10-openbox.sh: terminated successfully.
[cont-init ] 10-pkgs-mirror.sh: executing...
[cont-init ] 10-pkgs-mirror.sh: setting packages mirror to 'https://mirrors.tuna.tsinghua.edu.cn/alpine'...
[cont-init ] 10-pkgs-mirror.sh: terminated successfully.
[cont-init ] 10-set-tmp-dir-perms.sh: executing...
[cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init ] 10-vnc-password.sh: executing...
[cont-init ] 10-vnc-password.sh: creating VNC password file from environment variable...
[cont-init ] 10-vnc-password.sh: terminated successfully.
[cont-init ] 10-web-data.sh: executing...
[cont-init ] 10-web-data.sh: terminated successfully.
[cont-init ] 10-x11-unix.sh: executing...
[cont-init ] 10-x11-unix.sh: terminated successfully.
[cont-init ] 10-xdg-runtime-dir.sh: executing...
[cont-init ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init ] 15-cjk-font.sh: executing...
[cont-init ] 15-cjk-font.sh: installing CJK font...
[cont-init ] 15-cjk-font.sh: fetch https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/community/x86_64/APKINDEX.tar.gz
[cont-init ] 15-cjk-font.sh: WARNING: fetching https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/community: Permission denied
[cont-init ] 15-cjk-font.sh: fetch https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
[cont-init ] 15-cjk-font.sh: WARNING: fetching https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/main: Permission denied
[cont-init ] 15-cjk-font.sh: fetch https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
[cont-init ] 15-cjk-font.sh: WARNING: fetching https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/community: Permission denied
[cont-init ] 15-cjk-font.sh: ERROR: unable to select packages:
[cont-init ] 15-cjk-font.sh: font-wqy-zenhei (no such package):
[cont-init ] 15-cjk-font.sh: required by: world[font-wqy-zenhei]
[cont-init ] 15-cjk-font.sh: terminated with error 1.
cat docker-compose-yml
version: '3'
services:
firefox:
container_name: firefox-1
ports:
- '5800:5800'
volumes:
- './config:/config:rw'
environment:
- LANG=zh_CN.UTF-8
- KEEP_APP_RUNNING=1
- PACKAGES_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/alpine
- SECURE_CONNECTION=1
- VNC_PASSWORD=123456
- ENABLE_CJK_FONT=1
image: jlesage/firefox
from docker-firefox.
Sry, it’s a problem with the mirror source...
from docker-firefox.
Sry, it’s a problem with the mirror source...
wget https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/font-wqy-zenhei-0.9.45-r3.apk
docker cp font-wqy-zenhei-0.9.45-r3.apk firefox:/
docker exec -it firefox sh
apk add font-wqy-zenhei-0.9.45-r3.apk
enjoy it !
from docker-firefox.
wget https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/font-wqy-zenhei-0.9.45-r3.apk docker cp font-wqy-zenhei-0.9.45-r3.apk firefox:/ docker exec -it firefox sh apk add font-wqy-zenhei-0.9.45-r3.apk
enjoy it !
Thanks, this is another way.
from docker-firefox.
Related Issues (20)
- Increase tabs font size HOT 1
- [Bug] Setting Firefox prefrences via environment variables causes container to fail to start when prefrence value has a '/' character in it HOT 1
- [Feature request] Hardware acceleration for Intel I-GPU HOT 7
- Not able to get the perfect resolution on mobile screen HOT 1
- [Feature request] Firefox ESR HOT 2
- [Bug] WidevineCdm plugin has crashed
- [Feature request] I want more CJK font configuration HOT 2
- Filesystem access is allowed by firefox, filepicker and permission similar issues HOT 2
- [Feature request] Hope can use custom repo when install CJK HOT 3
- With option ENABLE_CJK_FONT=1 the container fails to create HOT 5
- Output of Console.log for developer HOT 5
- Not works when using HTTPS reverse proxy HOT 3
- Can someone explain how to browse the local file system via this browser? HOT 1
- [Feature request] Profile Manager HOT 1
- Add login HOT 1
- openwrt docker 中文显示乱码 HOT 3
- [Feature request] Improve VNC section of documentation. HOT 3
- [Bug] Firefox Docker Session Disconnects After Inactivity When Accessed Via Web Browser HOT 10
- [Bug] Unable to start container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-firefox.