Skip to main content

How To Install Fonts On Fluent Docker Container

This article outlines the different methods to install fonts on a Fluent Docker container.

Requirements

  • A Fluent Docker container
  • The font files you want on the container

Installing Fonts

There are two ways to install fonts on a Fluent Docker container. The first involves using the Docker CLI commands to copy files from the host machine to the container. The second involves using the Docker Desktop GUI to copy files from the host machine to the container.

Using Docker CLI Commands

  1. Copy the font files to the container using the following command:

    docker cp <path to font files> <container name>:<path to container>

    For example:

    docker cp C:\temp\fonts fluent:/usr/share/fonts

    Note: you can use this command to copy whole directories of font files, or individual font files.

  2. After your fonts have been copied over, make sure you restart the container. This is necessary for the fonts to be recognized by the container.

Using Docker Desktop GUI

  1. Open Docker Desktop and run your container:

  1. Click on the container to open the container details, then click on the "Files" tab:

  1. Navigate to the /usr/share/fonts directory

  1. Right click on the directory, and click "Import". This will open a window for you to select files to upload to the container. Find your font files and upload them.

  1. After your fonts have been copied over, make sure you restart the container. This is necessary for the fonts to be recognized by the container.