---
source: https://carbone.io/documentation/developer/on-premise-installation/container-customization.html
title: "Customize Carbone Docker"
description: "Create your own Carbone container"
generated_at: "2026-07-24"
---

# Customize Carbone Docker

Create your own Carbone container

## Introduction

We maintain our images on [Docker Hub](https://hub.docker.com/r/carbone/carbone-ee).

These images allow you to use Carbone in the best conditions. If, however, you have specific needs, such as [installing specific fonts](#install-your-own-fonts), choosing a particular [version of LibreOffice](#install-the-libreoffice-version-of-your-choice), or including [your own plugins](#installing-your-plugins).

## Reference docker image

Carbone reference images are available on [Docker Hub](https://hub.docker.com/r/carbone/carbone-ee).

You can choose between 3 variants:

-   `slim` : Minimal version of Carbone. This image does not include Libreoffice (no PDF generation possible).
-   `latest`, `full` : Full version of Carbone including the latest version of LibreOffice
-   `latest-fonts`, `full-fonts` : Full version of Carbone including the latest version of LibreOffice. This version also includes all Google Fonts⁠ (royalty-free).

The reference `Dockerfile` can be found in the [Github repository](https://github.com/carboneio/carbone-ee-docker).

## Install your own fonts

To install your own fonts, we recommend that you first read our documentation on [font support](/documentation/design/overview/font-support.md).

You need to have one or more `.ttf` files available for inclusion in your image. Here's an example of a `Dockerfile` :

```text
FROM carbone/carbone-ee:latest

USER root

RUN mkdir /usr/share/fonts/custom_fonts

COPY ./*.ttf /usr/share/fonts/custom_fonts

RUN fc-cache -f -v

USER carbone

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["webserver"]
```

Then build your image

```sh
docker build --tag my-carbone .
```

## Install the LibreOffice version of your choice

To use Carbone with a specific version of LibreOffice, you need to create a new image starting from our `slim` image.

Here's an example of a Dockerfile that installs LibreOffice 7.6.7.2 :

```text
FROM debian:stable-slim AS downloader
ADD https://downloadarchive.documentfoundation.org/libreoffice/old/7.6.7.2/deb/x86_64/LibreOffice_7.6.7.2_Linux_x86-64_deb.tar.gz /libreoffice.tar.gz

FROM carbone/carbone-ee:slim

USER root

RUN apt update && apt install -y libnss3 libxinerama1 libdbus-glib-1-2 libcairo2 libcups2 openssl

RUN --mount=type=bind,from=downloader,target=/tmp/libreoffice.tar.gz,source=libreoffice.tar.gz tar -zxf /tmp/libreoffice.tar.gz && dpkg -i LibreOffice*_Linux_*_deb/DEBS/*.deb && rm -r LibreOffice*

USER carbone

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["webserver"]
```

Then build your image

```sh
docker build --tag my-carbone .
```

## Installing your plugins

To integrate your plugins into your image, we recommend that you start with our `full` or `full-fonts` reference image and add your plugins to it.

Here's an example of how to add your own formatters developed in the `formatters.js` file:

```text
FROM carbone/carbone-ee:full

USER root

COPY --chown=carbone:nogroup ./formatters.js /app/plugin/

USER carbone

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["webserver"]
```

Then build your image

```sh
docker build --tag my-carbone .
```

## Related topics

- [Upgrade Guide](/documentation/developer/on-premise-installation/upgrade-guide.md)
- [Template management](/documentation/developer/on-premise-installation/template-management.md)
- [On-Premise Requirements](/documentation/developer/on-premise-installation/requirements.md)
- [On-Premise plugins](/documentation/developer/on-premise-installation/plugins.md)
- [Metrics (OpenMetrics)](/documentation/developer/on-premise-installation/metrics.md)
- [On-Premise](/documentation/developer/on-premise-installation/introduction.md)
