admin管理员组文章数量:1122846
I'm trying to run alpine inside docker container with GUI. So I'm using the following command
docker run -it --env="DISPLAY" --net=host --name ostestalpine alpine
Inside the container, I'm installing firefox and other necessary tools. And when I'm launching firefox it's launching but, all the texts are being rendered is some weird way, most probably with unicode representation only. Please check this image:
How can I fix this?
I'm trying to run alpine inside docker container with GUI. So I'm using the following command
docker run -it --env="DISPLAY" --net=host --name ostestalpine alpine
Inside the container, I'm installing firefox and other necessary tools. And when I'm launching firefox it's launching but, all the texts are being rendered is some weird way, most probably with unicode representation only. Please check this image:
How can I fix this?
Share Improve this question asked Nov 21, 2024 at 20:16 Maifee Ul AsadMaifee Ul Asad 4,6079 gold badges49 silver badges115 bronze badges 1- This doesn't seem like it's programming-related; if it is, can you edit the question to include whatever source code you've written? Also see Can you run GUI applications in a Linux Docker container? If your problem is font rendering, then this may be using the font files in the container and not fonts that exist on the host. Similar complexities exist up and down the stack, and I'd just run the browser and other desktop apps directly on the host system. – David Maze Commented Nov 21, 2024 at 21:12
1 Answer
Reset to default 0Resolved it by installing fonts:
apk --update --upgrade --no-cache add fontconfig ttf-freefont font-noto term
inus-font \
&& fc-cache -f \
&& fc-list | sort
If you want to add custom fonts, try adding them under /usr/share/fonts/Additional
references
- https://github.com/orzih/mkdocs-with-pdf/blob/c97272aa92440789de2d93a6e78ae42b9c441eef/docker/mkdocs-with-pdf/alpine/Dockerfile#L25-L29
- https://github.com/orzih/mkdocs-with-pdf/issues/50#issuecomment-767140386
本文标签: dockerHow can I properly render gui in my dockerized alpine containerStack Overflow
版权声明:本文标题:docker - How can I properly render gui in my dockerized alpine container - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307424a1933308.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论