{"id":1377,"date":"2024-07-23T12:39:19","date_gmt":"2024-07-23T12:39:19","guid":{"rendered":"https:\/\/dockerpros.com\/?post_type=glossary&#038;p=1377"},"modified":"2024-07-23T12:39:19","modified_gmt":"2024-07-23T12:39:19","slug":"montage-du-cache-dockerfile","status":"publish","type":"glossary","link":"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile-cache-mount\/","title":{"rendered":"Dockerfile \u2013cache-mount"},"content":{"rendered":"<h1>Compr\u00e9hension <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> <code>--cache-mount<\/code>: Une fonctionnalit\u00e9 avanc\u00e9e pour optimiser les performances de construction<\/h1>\n<p>Dans le monde de la conteneurisation, Docker est devenu une technologie de base, permettant aux d\u00e9veloppeurs d'empaqueter des applications et leurs d\u00e9pendances dans un environnement coh\u00e9rent. L'une des fonctionnalit\u00e9s cl\u00e9s qui am\u00e9liore les capacit\u00e9s de Docker est la possibilit\u00e9 de mettre en cache les couches pendant le processus de construction. <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une image est une repr\u00e9sentation visuelle d'un objet ou d'une sc\u00e8ne, g\u00e9n\u00e9ralement compos\u00e9e de pixels dans les formats num\u00e9riques. Elle peut transmettre des informations, susciter des \u00e9motions et faciliter la communication \u00e0 travers diff\u00e9rents m\u00e9dias.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> processus de construction. Le <code>--cache-mount<\/code> Cette option, introduite dans Docker 18.09 dans le cadre de BuildKit, permet aux d\u00e9veloppeurs de monter des r\u00e9pertoires de cache directement dans le processus de construction, acc\u00e9l\u00e9rant ainsi les builds et g\u00e9rant les d\u00e9pendances plus efficacement. Cet article explore en d\u00e9tail les concepts avanc\u00e9s li\u00e9s \u00e0 cette fonctionnalit\u00e9. <code>--cache-mount<\/code>, its syntax, best practices, and practical examples to optimize Docker <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une image est une repr\u00e9sentation visuelle d'un objet ou d'une sc\u00e8ne, g\u00e9n\u00e9ralement compos\u00e9e de pixels dans les formats num\u00e9riques. Elle peut transmettre des informations, susciter des \u00e9motions et faciliter la communication \u00e0 travers diff\u00e9rents m\u00e9dias.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> construit.<\/p>\n<h2>What is BuildKit?<\/h2>\n<p>BuildKit is a modern build subsystem for Docker that enhances the <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une image est une repr\u00e9sentation visuelle d'un objet ou d'une sc\u00e8ne, g\u00e9n\u00e9ralement compos\u00e9e de pixels dans les formats num\u00e9riques. Elle peut transmettre des informations, susciter des \u00e9motions et faciliter la communication \u00e0 travers diff\u00e9rents m\u00e9dias.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> building process. It allows for more efficient builds by leveraging features like parallel execution, improved caching, and the ability to define build-time secrets and SSH forwarding. The <code>--cache-mount<\/code> feature is one of the standout capabilities of BuildKit, enabling developers to specify external cache directories that can be reused, minimizing the need for redundant downloads and installations during the build.<\/p>\n<h2>Syntaxe de <code>--cache-mount<\/code><\/h2>\n<p>La syntaxe de base pour utiliser <code>--cache-mount<\/code> dans un <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> est la suivante :<\/p>\n<pre><code class=\"language-dockerfile\"><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target= <\/code><\/pre>\n<p>O\u00f9 :<\/p>\n<ul>\n<li><code>type=cache<\/code>: Specifies that the mount type is a cache.<\/li>\n<li><code>target=<\/code>Le chemin dans le <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\" target=\"_blank\">conteneur<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> o\u00f9 le cache sera accessible.<\/li>\n<li>&#8220;: The command you want to <span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">run<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, which may leverage the cached files.<\/li>\n<\/ul>\n<p>Cette syntaxe permet une int\u00e9gration fluide de la mise en cache dans votre processus de construction Docker, rendant possible le stockage des d\u00e9pendances t\u00e9l\u00e9charg\u00e9es pendant la construction dans un cache qui peut \u00eatre r\u00e9utilis\u00e9 \u00e0 travers plusieurs constructions.<\/p>\n<h2>Pourquoi utiliser <code>--cache-mount<\/code>?<\/h2>\n<h3>Am\u00e9lioration des performances<\/h3>\n<p>The primary benefit of <code>--cache-mount<\/code> est l'am\u00e9lioration significative des performances qu'il apporte au processus de construction. En mettant en cache les fichiers et les d\u00e9pendances, Docker \u00e9vite les t\u00e9l\u00e9chargements et installations r\u00e9p\u00e9t\u00e9s, ce qui peut \u00eatre chronophage. Cela est particuli\u00e8rement utile pour les projets avec de grandes d\u00e9pendances ou lorsque le processus de construction implique plusieurs \u00e9tapes.<\/p>\n<h3>Better Isolation of Caches<\/h3>\n<p><code>--cache-mount<\/code> offre une meilleure isolation pour le contenu mis en cache. Contrairement aux m\u00e9canismes de mise en cache conventionnels, qui peuvent m\u00e9langer les caches entre les projets ou les builds, cette fonctionnalit\u00e9 permet aux d\u00e9veloppeurs de sp\u00e9cifier exactement o\u00f9 et comment les caches sont utilis\u00e9s. Cette isolation r\u00e9duit le risque de pollution du cache et am\u00e9liore la fiabilit\u00e9 des builds.<\/p>\n<h3>Gestion simplifi\u00e9e des d\u00e9pendances<\/h3>\n<p>Lors de la cr\u00e9ation d'applications, en particulier dans les langages aux \u00e9cosyst\u00e8mes \u00e9tendus (par exemple, <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">Node<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.js, Python, Ruby), la gestion des d\u00e9pendances peut devenir fastidieuse. En utilisant <code>--cache-mount<\/code>, developers can create a clean state for their builds while keeping dependency caches isolated, allowing for easier updates and management.<\/p>\n<h2>Comment utiliser <code>--cache-mount<\/code> Effectively<\/h2>\n<p>To make the most of the <code>--cache-mount<\/code> feature, developers should consider several best practices:<\/p>\n<h3>1. Identify Cacheable Operations<\/h3>\n<p>Not every command in a <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> benefits from caching. Identify operations that are time-consuming but consistent across builds, such as:<\/p>\n<ul>\n<li>Package installations (e.g., <code>apt-get install<\/code>, <code>pip install<\/code>, <code>npm install<\/code>)<\/li>\n<li>\u00c9tapes de r\u00e9solution des d\u00e9pendances<\/li>\n<li>Compilation steps<\/li>\n<\/ul>\n<p>For example, in a <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">Node<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.js application, you can cache the installation of packages as follows:<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">n\u0153ud<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:14\n\n# Specify a cache for npm dependencies\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/root\/.npm \n    npm install<\/code><\/pre>\n<h3>2. Utiliser des chemins de cache sp\u00e9cifiques<\/h3>\n<p>Lors de l'utilisation de <code>--cache-mount<\/code>, il est essentiel de sp\u00e9cifier avec pr\u00e9cision le chemin cible du cache. La cible doit \u00eatre un r\u00e9pertoire sp\u00e9cifiquement d\u00e9di\u00e9 \u00e0 la mise en cache des d\u00e9pendances. Utiliser un r\u00e9pertoire g\u00e9n\u00e9ral peut entra\u00eener des r\u00e9sultats inattendus et r\u00e9duire l'efficacit\u00e9 de la mise en cache.<\/p>\n<h3>3. Combine <code>--cache-mount<\/code> with Multi-Stage Builds<\/h3>\n<p>Les constructions multi-\u00e9tapes permettent de cr\u00e9er des images plus petites et plus efficaces. En combinant <code>--cache-mount<\/code> with multi-stage builds, you can cache dependencies in one stage and use them in subsequent stages. This approach keeps your final <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une image est une repr\u00e9sentation visuelle d'un objet ou d'une sc\u00e8ne, g\u00e9n\u00e9ralement compos\u00e9e de pixels dans les formats num\u00e9riques. Elle peut transmettre des informations, susciter des \u00e9motions et faciliter la communication \u00e0 travers diff\u00e9rents m\u00e9dias.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> lightweight while maximizing build efficiency.<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">n\u0153ud<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:14 AS builder\n\n# Cache npm packages\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/root\/.npm \n    npm install\n\nFROM <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">n\u0153ud<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:14 AS production\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">COPIE<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --from=builder \/app \/app<\/code><\/pre>\n<h3>4. Nettoyer le cache r\u00e9guli\u00e8rement<\/h3>\n<p>La mise en cache est une arme \u00e0 double tranchant. Bien qu'elle acc\u00e9l\u00e8re les builds, elle peut \u00e9galement entra\u00eener des r\u00e9pertoires de cache surcharg\u00e9s si elle n'est pas g\u00e9r\u00e9e correctement. Envisagez de mettre en place des \u00e9tapes de nettoyage pour supprimer les entr\u00e9es de cache p\u00e9rim\u00e9es, afin de s'assurer que les caches ne consomment pas d'espace inutile au fil du temps.<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\" target=\"_blank\">n\u0153ud<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:14 AS builder\n\n# Cache npm packages\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/root\/.npm \n    npm install &amp;&amp; \n    npm cache clean --force<\/code><\/pre>\n<h3>5. Profile Build Performance<\/h3>\n<p>To effectively utilize <code>--cache-mount<\/code>, it\u2019s crucial to monitor and analyze build performance. Tools like Docker BuildKit\u2019s built-in logging and monitoring can help you identify bottlenecks in your builds. Make necessary adjustments to your <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> based on these insights.<\/p>\n<h3>6. Testing and Quality Assurance<\/h3>\n<p>Before deploying changes to production, ensure your <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> changes, including those involving <code>--cache-mount<\/code>, sont rigoureusement test\u00e9s. Les pipelines CI\/CD automatis\u00e9s peuvent aider \u00e0 v\u00e9rifier que les modifications apportent les am\u00e9liorations de performances attendues sans introduire de r\u00e9gressions.<\/p>\n<h2>Example Use Cases<\/h2>\n<p>Let\u2019s explore some practical use cases for <code>--cache-mount<\/code> to illustrate its potential.<\/p>\n<h3>Exemple 1 : Application Python<\/h3>\n<p>In a Python application, managing dependencies can be time-consuming, especially when using pip. You can cache the pip package installations using <code>--cache-mount<\/code> as follows:<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM python:3.9\n\n<span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\" target=\"_blank\">WORKDIR<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">L'instruction `WORKDIR` dans le Dockerfile d\u00e9finit le r\u00e9pertoire de travail pour les instructions suivantes. Elle simplifie la gestion des chemins, car tous les chemins relatifs seront r\u00e9solus \u00e0 partir de ce r\u00e9pertoire, am\u00e9liorant ainsi la clart\u00e9 de la construction.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \/app\n\n# Cache pip dependencies\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/root\/.cache\/pip \n    pip install -r requirements.txt<\/code><\/pre>\n<p>This approach reduces the time taken for subsequent builds, as pip can utilize the cached packages rather than downloading them again.<\/p>\n<h3>Exemple 2 : Application Go<\/h3>\n<p>Pour les applications Go, o\u00f9 la gestion des d\u00e9pendances peut \u00eatre complexe, le <code>--cache-mount<\/code> Cette fonctionnalit\u00e9 peut consid\u00e9rablement optimiser le processus de build.<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM golang:1.16 AS builder\n\n<span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\" target=\"_blank\">WORKDIR<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">L'instruction `WORKDIR` dans le Dockerfile d\u00e9finit le r\u00e9pertoire de travail pour les instructions suivantes. Elle simplifie la gestion des chemins, car tous les chemins relatifs seront r\u00e9solus \u00e0 partir de ce r\u00e9pertoire, am\u00e9liorant ainsi la clart\u00e9 de la construction.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \/app\n\n# Cache Go modules\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/go\/pkg\/mod \n    go mod download\n\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">COPIE<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .\n\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> go build -o myapp<\/code><\/pre>\n<p>Using this structure allows the Go module cache to persist across builds, leading to faster build times.<\/p>\n<h3>Example 3: Java Application with Maven<\/h3>\n<p>Dans les applications Java qui utilisent Maven, la fonctionnalit\u00e9 de montage de cache peut aider \u00e0 g\u00e9rer les d\u00e9pendances de mani\u00e8re efficace :<\/p>\n<pre><code class=\"language-dockerfile\"># syntax=docker\/dockerfile:1.3\nFROM maven:3.8.1 AS builder\n\n<span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\" target=\"_blank\">WORKDIR<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">L'instruction `WORKDIR` dans le Dockerfile d\u00e9finit le r\u00e9pertoire de travail pour les instructions suivantes. Elle simplifie la gestion des chemins, car tous les chemins relatifs seront r\u00e9solus \u00e0 partir de ce r\u00e9pertoire, am\u00e9liorant ainsi la clart\u00e9 de la construction.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \/app\n\n# Cache Maven dependencies\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --mount=type=cache,target=\/root\/.m2\/repository \n    mvn dependency:go-offline\n\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\" target=\"_blank\">COPIE<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">COPY is a command in computer programming and data management that facilitates the duplication of files or data from one location to another, ensuring data integrity and accessibility.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .\n\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\" target=\"_blank\">RUN<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> mvn package<\/code><\/pre>\n<p>This <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> caches Maven dependencies, allowing for faster builds when only the application code changes.<\/p>\n<h2>Conclusion<\/h2>\n<p>The <code>--cache-mount<\/code> feature in <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, powered by BuildKit, offers advanced caching capabilities that can vastly improve the efficiency of your Docker builds. By understanding its syntax, benefits, and best practices, developers can optimize their build processes, manage dependencies more effectively, and ultimately create faster and more reliable Docker images.<\/p>\n<p>Alors que la conteneurisation continue d'\u00e9voluer, l'importance des performances de construction ne peut \u00eatre surestim\u00e9e. L'exploitation de fonctionnalit\u00e9s telles que <code>--cache-mount<\/code> non seulement am\u00e9liore votre flux de d\u00e9veloppement, mais contribue \u00e9galement \u00e0 une meilleure utilisation des ressources et \u00e0 des processus de d\u00e9ploiement d'applications optimis\u00e9s. Adoptez cet outil puissant dans votre bo\u00eete \u00e0 outils Docker, et observez la r\u00e9duction de vos temps de compilation tout en pr\u00e9servant l'int\u00e9grit\u00e9 de vos applications.<\/p>","protected":false},"excerpt":{"rendered":"<p>L'option `\u2013cache-mount` dans <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> enhances build efficiency by allowing the use of cached data from previous builds. This speeds up layer creation and reduces unnecessary data transfers during <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une image est une repr\u00e9sentation visuelle d'un objet ou d'une sc\u00e8ne, g\u00e9n\u00e9ralement compos\u00e9e de pixels dans les formats num\u00e9riques. Elle peut transmettre des informations, susciter des \u00e9motions et faciliter la communication \u00e0 travers diff\u00e9rents m\u00e9dias.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> building.<\/p>","protected":false},"author":1,"featured_media":2067,"parent":0,"template":"","glossary-cat":[],"class_list":["post-1377","glossary","type-glossary","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dockerfile -cache-mount - Dockerpros<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dockerpros.com\/fr\/wiki\/montage-du-cache-dockerfile\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dockerfile -cache-mount - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"The `--cache-mount` option in Dockerfile enhances build efficiency by allowing the use of cached data from previous builds. This speeds up layer creation and reduces unnecessary data transfers during image building.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/fr\/wiki\/montage-du-cache-dockerfile\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/\",\"url\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/\",\"name\":\"Dockerfile -cache-mount - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg\",\"datePublished\":\"2024-07-23T12:39:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg\",\"width\":800,\"height\":600,\"caption\":\"dockerfile-cache-mount-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dockerpros.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Glossary\",\"item\":\"https:\/\/dockerpros.com\/fr\/wiki\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Dockerfile &#8211;cache-mount\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dockerpros.com\/#website\",\"url\":\"https:\/\/dockerpros.com\/\",\"name\":\"Dockerpros\",\"description\":\"DockerPros \u2013 Your Ultimate Docker Resource Hub\",\"publisher\":{\"@id\":\"https:\/\/dockerpros.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dockerpros.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dockerpros.com\/#organization\",\"name\":\"Dockerpros\",\"url\":\"https:\/\/dockerpros.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"width\":532,\"height\":114,\"caption\":\"Dockerpros\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dockerfile -cache-mount - Dockerpros","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dockerpros.com\/fr\/wiki\/montage-du-cache-dockerfile\/","og_locale":"fr_FR","og_type":"article","og_title":"Dockerfile -cache-mount - Dockerpros","og_description":"The `--cache-mount` option in Dockerfile enhances build efficiency by allowing the use of cached data from previous builds. This speeds up layer creation and reduces unnecessary data transfers during image building.","og_url":"https:\/\/dockerpros.com\/fr\/wiki\/montage-du-cache-dockerfile\/","og_site_name":"Dockerpros","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/","url":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/","name":"Dockerfile -cache-mount - Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg","datePublished":"2024-07-23T12:39:19+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-mount_1377.jpg","width":800,"height":600,"caption":"dockerfile-cache-mount-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-mount\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dockerpros.com\/"},{"@type":"ListItem","position":2,"name":"Glossary","item":"https:\/\/dockerpros.com\/fr\/wiki\/"},{"@type":"ListItem","position":3,"name":"Dockerfile &#8211;cache-mount"}]},{"@type":"WebSite","@id":"https:\/\/dockerpros.com\/#website","url":"https:\/\/dockerpros.com\/","name":"Dockerpros","description":"DockerPros \u2013 Votre centre de ressources Docker incontournable","publisher":{"@id":"https:\/\/dockerpros.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dockerpros.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/dockerpros.com\/#organization","name":"Dockerpros","url":"https:\/\/dockerpros.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","width":532,"height":114,"caption":"Dockerpros"},"image":{"@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary\/1377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary\/1377\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media\/2067"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media?parent=1377"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary-cat?post=1377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}