Installing Microsoft True Type Core Fonts on Debian based Docker Image

Problem

I had a problem where one of the jasper reports loaded onto a docker image based on Debian Jessie was not running.

It was throwing this error, “font arial not available to jvm”

Solution

Add the following mirror to the sources.list file:


root@host:/usr/local/# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian jessie main contrib

Then do apt-get update and then install the ttf-mscorefonts-installer package:


root@host:/usr/local/# apt-get update

root@host:/usr/local/# apt-get install ttf-mscorefonts-installer

Then restart the docker image.

References

Download Page for ttf-mscorefonts-installer_3.6_all.deb

Font ‘Arial’ is not available to the JVM. See the

Font ‘Arial’ is not available to the JVM

 

 

2 thoughts on “Installing Microsoft True Type Core Fonts on Debian based Docker Image

  1. Incorrect. Docker containers are ephemeral, as soon as the container is removed you lose that configuration.

    You should instead add that mirror to `/etc/apt/sources.list` in the `Dockerfile`, (assuming the mirror is correct).

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s