question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker setup doesn't have access to user fonts

See original GitHub issue

When building using docker in Linux, fonts installed in ~/.local/share/fonts/ won’t work. I guess a -v mount trick could be used. I decided to build phantomjs instead.

I haven’t confirmed if docker has access to globally installed fonts.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
astefanutticommented, May 3, 2019

Right. Otherwise we can add an item in the FAQ.

1reaction
wietzecommented, May 16, 2019

Just for reference, since this image runs with node as user, the full path is /home/node/.local/share/fonts.

I used the following to get default Microsoft fonts working:

wget --output-document fonts.zip https://www.w7df.com/files0/Windows7DefaultFonts.zip?dl=1 && unzip fonts.zip && rm fonts.zip
docker run (...) -v `pwd`/Windows7DefaultFonts:/home/node/.local/share/fonts (...)

Similarly, emojis in my presentation rendered in colour in Chrome, but for some reason showed in black-and-white when running it through Decktape.

I used the following to get colour emojis:

wget https://noto-website.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip && unzip NotoColorEmoji-unhinted.zip && rm NotoColorEmoji-unhinted.zip
docker run (...) -v `pwd`:/home/node/.local/share/fonts (...)
Read more comments on GitHub >

github_iconTop Results From Across the Web

google chrome - How to install fonts in Docker? - Stack Overflow
My solution that worked is to download Google fonts and install it manually. Image size grows up to 1GB. FROM zenika/alpine-chrome USER root ......
Read more >
Install Fonts in Docker Containers - Axel's Scribbles
In this post I will describe how to install fonts in Docker containers, via the Dockerfile. Let's say you have a custom font...
Read more >
Net Core Linux Docker - Problem with Fonts - Aspose Forums
This is command for Linux based terminal. You can type this in a terminal according to the version of Linux which you are...
Read more >
Bring your favourite fonts to reports running in Docker - Medium
Here is the step-by-step guide on how to enable custom fonts (PT Sans in this case) for JasperReports, or any other reports library....
Read more >
Installing fonts on Docker Container running Ubuntu 18.04
Put fonts to the image when building it,; Attach a volume with fonts when starting the container;. The first one is useful if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found