> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/texlive/it/texlive-in-docker.md).

# TeXLive in Docker

### Docker

Docker offre un modo leggero e portatile per confezionare ed eseguire applicazioni in container isolati. Raggruppando l'applicazione insieme a tutte le dipendenze richieste, un container garantisce un comportamento coerente su macchine diverse, dai laptop ai server di produzione.

TeX Live è potente ma grande e sensibile alle differenze a livello di sistema. Confezionare TeX Live all'interno di un'immagine Docker rende la toolchain LaTeX prevedibile, riproducibile e facile da distribuire.

Tuttavia, alcuni pacchetti TeX Live si basano sull'accesso alla shell. Per motivi di sicurezza, il container dovrebbe essere eseguito in un ambiente ristretto che impedisca agli utenti di eseguire comandi shell arbitrari (ad esempio tramite `\write18` o shell escape). Questo isolamento protegge il sistema host ed evita l'accesso indesiderato al filesystem sottostante del container o a strumenti come `bash`.

### Edizione completa di TeXLive

[TeXLive-Full@ayaka-notes](https://github.com/ayaka-notes/texlive-full/) è una **immagine Docker di TeXLive** progettata appositamente per Overleaf Server Pro, Overleaf Pro e anche per ambienti di compilazione LaTeX standalone, come CI o pipeline.

Questa immagine mira a fornire una distribuzione TeXLive quasi completa con font e strumenti comuni preinstallati, al fine di ridurre al minimo i fallimenti di compilazione causati da pacchetti o font mancanti.

Funzionalità:

* 🚀 Supporta sia architetture server x86\_64 che arm64
* 📦 Installazione TeXLive completa e ottimizzata
* 🧩 Font e utilità comuni preinstallati
* 🐳 Pronta all'uso con Docker e Docker Compose
* 🧪 Testata con Overleaf Server Pro / Overleaf Pro
* 🔄 Aggiornata regolarmente con le ultime release di TeXLive
* 🏷 Più tag di versioni TeXLive (2020 – Ultima)
* 🧑‍🔬 Supporto Knitr per codice R nei documenti LaTeX

### Uso di Overleaf Pro

[TeXLive-Full@ayaka-notes](https://github.com/ayaka-notes/texlive-full/) supporto **Overleaf Pro**, puoi usare le seguenti variabili d'ambiente per `config/variables.env` file se sei un [utente toolkit](https://github.com/overleaf/toolkit).

Per esempio:

{% code title="config/variables.env" overflow="wrap" %}

```dotenv
ALL_TEX_LIVE_DOCKER_IMAGES=ghcr.io/ayaka-notes/texlive-full:2025.1, ghcr.io/ayaka-notes/texlive-full:2024.1
ALL_TEX_LIVE_DOCKER_IMAGE_NAMES=Texlive 2025, Texlive 2024
TEX_LIVE_DOCKER_IMAGE=ghcr.io/ayaka-notes/texlive-full:2025.1
```

{% endcode %}

### Versione di TeXLive

Grazie a GitHub Actions, possiamo costruire tutte le immagini tex in parallelo, che includono:

* `ghcr.io/ayaka-notes/texlive-full:2026.1` (Anche `latest` tag)
* `ghcr.io/ayaka-notes/texlive-full:2025.1`
* `ghcr.io/ayaka-notes/texlive-full:2024.1`
* `ghcr.io/ayaka-notes/texlive-full:2023.1`
* `ghcr.io/ayaka-notes/texlive-full:2022.1`
* `ghcr.io/ayaka-notes/texlive-full:2021.1`
* `ghcr.io/ayaka-notes/texlive-full:2020.1`
* `ghcr.io/ayaka-notes/texlive-full:base`

Usiamo l'archivio mirror da [info TeXLive](https://texlive.info/tlnet-archive/), che include quasi tutte le immagini texlive che vanno dal 1996 al 2026. E grazie al Dockerfile di Overleaf, possiamo costruire questo progetto più velocemente.

> Perché texlive 2019 e precedenti non sono supportati ?
>
> Mantenere immagini del genere è più che difficile. E crediamo che tu non le usi più, dato che sono troppo vecchie. Se ne hai bisogno, apri una issue per farmelo sapere.

### Componenti inclusi

I seguenti pacchetti sono contenuti nell'immagine docker.

* Tutti i pacchetti TeXLive (di quell'anno)
* Pacchetti R (solo selezionati)
* fontconfig inkscape pandoc python3-pygments wget python3
* gnupg gnuplot perl-modules perl ca-certificates
* ghostscript qpdf r-base-core tar

I seguenti font sono contenuti nell'immagine docker.

* [Google Fonts](https://fonts.google.com/)
* [Microsoft msttcorefonts](https://packages.ubuntu.com/jammy/ttf-mscorefonts-installer)
* [Font supportati da Overleaf](https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F)

{% hint style="warning" %}
Si prega di confermare se i font pertinenti possono essere usati commercialmente. Non siamo **responsabili** per eventuali problemi legali derivanti dal tuo uso improprio dei font. Una volta scaricata l'immagine, accetti automaticamente questo.
{% endhint %}

### Licenza

MIT

### Problemi

<details>

<summary>Problema 01: problema di mancato hit della cache dei font</summary>

Quando Overleaf compila un progetto LaTeX, se si verifica una mancanza di font, **potresti notare che il processo di compilazione richiede molto tempo**, questo perché quando manca un font, TeXLive proverà a **ricostruire l'intera cache dei font**. Questo è un processo che richiede tempo.

Nella nostra immagine, abbiamo pre-costruito la cache dei font, risolviamo questo problema con [questo commit](https://github.com/ayaka-notes/texlive-full/commit/0cb66b0dc8b82be628cf6999cfd659d9784e132f)

</details>

<details>

<summary>Problema 02: Sync TeX estremamente lento</summary>

Quando usi questa immagine in ShareLaTeX, potresti notare che la sincronizzazione tex è estremamente lenta.

Vedi: <https://github.com/overleaf/overleaf/issues/1150>, basta disabilitare HTTP 2.0.

</details>

<details>

<summary>Problema 03: errore di ricompilazione con l'immagine ufficiale TexLive</summary>

Se usi l'immagine ufficiale texlive su Docker Hub `texlive/texlive`, potresti notare che quando ricompili un progetto, viene riportato un errore. Tuttavia, nella nostra immagine, questo problema è risolto. Perché usiamo l'ultima immagine base Ubuntu e installiamo tutte le dipendenze dal repository ufficiale Ubuntu.

</details>

### Altri promemoria tecnici

Durante la build dell'immagine texlive (prima del 2019), potresti dover prestare attenzione ai seguenti problemi:

* Solo `http`/`ftp` è supportato prima di texlive 2017, quindi non puoi usare `https` per scaricare, a meno che tu non modifichi lo `peal` script.
* Prima del 2015, viene fornito solo il file sha256. Quindi non puoi usare sha512 per verificare.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/texlive/it/texlive-in-docker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
