Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not fetch font-wqy-zenhei #229

Open
Adore1105 opened this issue Mar 1, 2024 · 13 comments
Open

Can not fetch font-wqy-zenhei #229

Adore1105 opened this issue Mar 1, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@Adore1105
Copy link

Adore1105 commented Mar 1, 2024

BUG

When I use the enviroment -e KEEP_APP_RUNNING=1 , docker can not run.
Because can not fetch font-wqy-zenhei on http://dl-cdn.alpinelinux.org/alpine/edge/testing
Seems that is deleted.

@Adore1105 Adore1105 added the enhancement New feature or request label Mar 1, 2024
@jlesage
Copy link
Owner

jlesage commented Mar 2, 2024

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 ?

@Adore1105
Copy link
Author

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

@jlesage
Copy link
Owner

jlesage commented Mar 4, 2024

What is the complete log? There is no error in what you provided.

@Adore1105
Copy link
Author

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.

@jlesage
Copy link
Owner

jlesage commented Mar 4, 2024

Can the machine running the container access https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz ?

@sleep4at
Copy link

sleep4at commented Mar 8, 2024

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)

image

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.

image

@sleep4at
Copy link

sleep4at commented Mar 8, 2024

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......

@jlesage
Copy link
Owner

jlesage commented Mar 8, 2024

You can also use the PACKAGES_MIRROR environment variable to specify a different Alpine repo to use.

@sleep4at
Copy link

sleep4at commented Mar 8, 2024

还可以使用环境变量指定要使用的其他 Alpine 存储库。PACKAGES_MIRROR

Fine, I thought I wouldn't need the mirror source......

@sleep4at
Copy link

sleep4at commented Mar 9, 2024

还可以使用环境变量指定要使用的其他 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

@sleep4at
Copy link

sleep4at commented Mar 9, 2024

Sry, it’s a problem with the mirror source...

@JeazW
Copy link

JeazW commented Mar 11, 2024

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 !

@sleep4at
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants