{"id":1405,"date":"2024-07-23T12:39:31","date_gmt":"2024-07-23T12:39:31","guid":{"rendered":"https:\/\/dockerpros.com\/?post_type=glossary&#038;p=1405"},"modified":"2024-07-23T12:39:31","modified_gmt":"2024-07-23T12:39:31","slug":"limites-de-cache-docker","status":"publish","type":"glossary","link":"https:\/\/dockerpros.com\/fr\/wiki\/dockerfile-cache-limits\/","title":{"rendered":"Dockerfile \u2013cache-limits"},"content":{"rendered":"<h1>Comprendre Dockerfile \u2013cache-limits : Plong\u00e9e au c\u0153ur des strat\u00e9gies de cache avanc\u00e9es de Docker<\/h1>\n<p>Docker a r\u00e9volutionn\u00e9 la mani\u00e8re dont les applications sont d\u00e9velopp\u00e9es, exp\u00e9di\u00e9es et d\u00e9ploy\u00e9es. L'un des composants essentiels de Docker est le <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>, a script that contains a series of instructions on how to build a 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>. Among the many features that Docker offers, caching is a pivotal one that enhances build efficiency and performance. With the introduction of the <code>--limites-de-cache<\/code> option, users can exert finer control over caching behaviors during the build process. This article delves deeply into the <code>--limites-de-cache<\/code> flag, its implications, and how it can be leveraged for advanced Docker management.<\/p>\n<h2>What are Docker Caches?<\/h2>\n<p>Avant d'explorer <code>--limites-de-cache<\/code>, it\u2019s essential to understand what caching in Docker entails. Docker uses a layered filesystem; each instruction 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> results in a new layer. When a 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> is built, Docker checks whether it can reuse existing layers based on caching. If the context of a layer has not changed (i.e., the command and its parameters are identical, and the files involved have not been modified), Docker will serve that layer from the cache instead of rebuilding it. This dramatically speeds up the build process, especially when working with large codebases or complex images.<\/p>\n<h3>The Role of Caching in Docker Builds<\/h3>\n<p>Caching serves several functions in Docker builds:<\/p>\n<ol>\n<li><strong>Am\u00e9lioration des performances<\/strong>: By reusing layers, Docker can significantly reduce the time required to build images.<\/li>\n<li><strong>Efficacit\u00e9 des ressources<\/strong>: Caching minimizes CPU and disk usage, making builds more efficient in environments with limited resources.<\/li>\n<li><strong>Consistency<\/strong>: Les couches mises en cache garantissent que les builds produisent la m\u00eame sortie que les builds pr\u00e9c\u00e9dents, en supposant que le contexte sous-jacent n'a pas chang\u00e9.<\/li>\n<\/ol>\n<p>However, caching is not without its challenges. For example, Docker\u2019s default caching mechanism can lead to issues where outdated layers are used, resulting in inconsistencies or security vulnerabilities.<\/p>\n<h2>Introduction \u00e0 \u2013cache-limits<\/h2>\n<p>The <code>--limites-de-cache<\/code> flag was introduced to provide developers more control over how Docker manages cache during 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> build process. This feature allows users to set limits on the number of cache entries retained, which can be particularly useful in scenarios where disk space is constrained or where the cache becomes stale.<\/p>\n<h3>Syntax and Usage<\/h3>\n<p>The <code>--limites-de-cache<\/code> L'option peut \u00eatre sp\u00e9cifi\u00e9e lors de l'ex\u00e9cution de la commande Docker build et prend deux param\u00e8tres principaux :<\/p>\n<ul>\n<li><strong><code>taille-max-cache<\/code><\/strong>: The maximum size of the cache in bytes.<\/li>\n<li><strong><code>max-cache-entries<\/code><\/strong>: The maximum number of cache entries to retain.<\/li>\n<\/ul>\n<p>The syntax is as follows:<\/p>\n<pre><code class=\"language-bash\">docker build --cache-limits max-cache-size=max_size,max-cache-entries=max_entries .<\/code><\/pre>\n<p>For example, to limit the cache size to 100MB and the number of entries to 50, you would use:<\/p>\n<pre><code class=\"language-bash\">docker build --cache-limits max-cache-size=100m,max-cache-entries=50 .<\/code><\/pre>\n<h3>Avantages de l'utilisation de \u2013cache-limits<\/h3>\n<p>The introduction of <code>--limites-de-cache<\/code> offers several advantages:<\/p>\n<ol>\n<li><strong>Utilisation optimis\u00e9e du disque<\/strong>: By limiting the size and number of cache entries, you can prevent unnecessary disk space consumption, especially in CI\/CD environments where multiple builds occur frequently.<\/li>\n<li><strong>Improved Build Speed<\/strong>: A well-managed cache can reduce the time to locate relevant layers, thus speeding up the build process.<\/li>\n<li><strong>flexibilit\u00e9<\/strong>: Developers can tailor caching strategies to fit specific projects or environments, enhancing adaptability to varying resource constraints.<\/li>\n<li><strong>Avoiding Cache Bloat<\/strong>: Au fil du temps, les caches peuvent devenir excessivement volumineux, ralentissant les builds et consommant des ressources. La d\u00e9finition de limites permet de mitiger ce probl\u00e8me.<\/li>\n<\/ol>\n<h2>Best Practices for Using \u2013cache-limits<\/h2>\n<p>To effectively leverage the <code>--limites-de-cache<\/code> feature, consider the following best practices:<\/p>\n<h3>1. Assess Your Build Environment<\/h3>\n<p>Avant la mise en \u0153uvre <code>--limites-de-cache<\/code>, \u00e9valuez les contraintes de ressources de votre environnement de construction. Comprendre l'espace disque disponible, la fr\u00e9quence de construction typique et la taille de vos images Docker peut vous aider \u00e0 d\u00e9finir vos param\u00e8tres.<\/p>\n<h3>2. Commencez par des limites conservatrices<\/h3>\n<p>Lors de la premi\u00e8re utilisation du <code>--limites-de-cache<\/code> Commencez par des limites conservatrices. Surveillez vos constructions et ajustez-les si n\u00e9cessaire. Par exemple, fixez une limite de 50 Mo et 20 entr\u00e9es, puis \u00e9valuez les performances avant <span class=\"glossaryai-tooltip glossary-term-696\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/scaling\/\" target=\"_blank\">scaling<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Scaling refers to the process of adjusting the capacity of a system to accommodate varying loads. It can be achieved through vertical scaling, which enhances existing resources, or horizontal scaling, which adds additional resources.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/scaling\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> en haut ou en bas.<\/p>\n<h3>3. Monitor Cache Usage<\/h3>\n<p>Regularly check how your cache is being used. Use commands like <code>docker builder prune<\/code> pour nettoyer le cache de construction inutilis\u00e9, ou analyser les statistiques d'utilisation du cache pour informer votre <code>--limites-de-cache<\/code> param\u00e8tres.<\/p>\n<h3>4. Consider Layering Strategies<\/h3>\n<p>The effectiveness of <code>--limites-de-cache<\/code> is closely tied to how you structure 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>. Optimize the layering of commands to maximize cache reusability. For example, group installation commands or separate application code from libraries to leverage caching.<\/p>\n<h3>5. Use CI\/CD Tools Effectively<\/h3>\n<p>Dans les environnements CI\/CD, tirer parti <code>--limites-de-cache<\/code> pour g\u00e9rer efficacement la mise en cache sur plusieurs builds. Cela est particuli\u00e8rement utile dans les pipelines conteneuris\u00e9s o\u00f9 les builds peuvent \u00eatre d\u00e9clench\u00e9s fr\u00e9quemment.<\/p>\n<h2>Troubleshooting Cache Issues<\/h2>\n<p>While <code>--limites-de-cache<\/code> Bien que l'optimisation de la mise en cache puisse \u00eatre b\u00e9n\u00e9fique, elle peut \u00e9galement entra\u00eener des sc\u00e9narios o\u00f9 les builds \u00e9chouent en raison de couches de cache manquantes ou de manques de cache inattendus. Voici quelques conseils de d\u00e9pannage :<\/p>\n<h3>1. Inspecter le comportement du cache<\/h3>\n<p>Le texte fourni est incomplet. <code>docker build --no-cache<\/code> option to bypass caching and force a complete rebuild. This helps identify whether issues stem from stale layers or from configuration errors in 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>.<\/p>\n<h3>2. Examinez la sortie de g\u00e9n\u00e9ration<\/h3>\n<p>Pay close attention to the output of your Docker build. Docker logs provide insights into which layers are being cached and which are being rebuilt. If unexpected layers are being rebuilt, review the related <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> instructions for any changes.<\/p>\n<h3>3. Exp\u00e9rimentez avec les limites du cache<\/h3>\n<p>Si vous rencontrez fr\u00e9quemment des d\u00e9fauts de cache, envisagez d'augmenter temporairement le <code>taille-max-cache<\/code> or <code>max-cache-entries<\/code> valeurs pour voir si cela r\u00e9sout le probl\u00e8me.<\/p>\n<h3>4. Use BuildKit for Advanced Features<\/h3>\n<p>Docker BuildKit introduit des fonctionnalit\u00e9s de mise en cache suppl\u00e9mentaires qui peuvent compl\u00e9ter <code>--limites-de-cache<\/code>. Par exemple, la mise en cache peut \u00eatre plus efficace lors de l'utilisation du <code>--build-arg<\/code> and <code>--secret<\/code> Indicateurs. Assurez-vous que votre environnement est configur\u00e9 pour utiliser BuildKit efficacement.<\/p>\n<h2>Cas d'usage dans le monde r\u00e9el<\/h2>\n<p>Pour illustrer les applications pratiques de <code>--limites-de-cache<\/code>, explorons quelques sc\u00e9narios du monde r\u00e9el.<\/p>\n<h3>Sc\u00e9nario 1 : CI\/CD avec des ressources limit\u00e9es<\/h3>\n<p>In a CI\/CD pipeline where builds are frequently triggered, a team might find that their <span class=\"glossaryai-tooltip glossary-term-741\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-cache\/\" target=\"_blank\">Docker cache<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Docker Cache optimise la construction d'images en stockant les couches interm\u00e9diaires, permettant ainsi des builds plus rapides en r\u00e9utilisant les couches inchang\u00e9es. Cela r\u00e9duit la redondance et am\u00e9liore l'efficacit\u00e9 des flux de travail de d\u00e9veloppement.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-cache\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> cro\u00eet de mani\u00e8re excessive, consommant de l'espace disque sur leur serveur de build. En mettant en \u0153uvre <code>--limites-de-cache<\/code>, they can set a maximum cache size of 200MB and limit entries to 100. This ensures that builds remain efficient without overwhelming the available resources.<\/p>\n<h3>Sc\u00e9nario 2 : Architecture de microservices<\/h3>\n<p>Dans une architecture de microservices o\u00f9 plusieurs images Docker sont construites, chacune correspondant \u00e0 un diff\u00e9rent <span class=\"glossaryai-tooltip glossary-term-681\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/service\/\" target=\"_blank\">service<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Le service fait r\u00e9f\u00e9rence \u00e0 l'acte de fournir une assistance ou un soutien pour r\u00e9pondre \u00e0 des besoins ou des exigences sp\u00e9cifiques. Dans divers domaines, il englobe le service client, le support technique et les services professionnels, en mettant l'accent sur l'efficacit\u00e9 et la satisfaction de l'utilisateur.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/service\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, la gestion du cache peut devenir complexe. En utilisant <code>--limites-de-cache<\/code>, the development team can maintain a lean cache across all services. For instance, they might choose to limit their cache to 500MB and 200 entries, ensuring that builds are quick and resource-efficient while still retaining the most relevant layers for rapid development.<\/p>\n<h2>Conclusion<\/h2>\n<p>The <code>--limites-de-cache<\/code> feature in Docker provides a powerful tool for optimizing the caching mechanism during 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> build process. By offering control over cache size and entry limits, users can fine-tune their builds to maximize performance and resource efficiency. As containerization continues to evolve and integrate deeper into development workflows, understanding and utilizing features like <code>--limites-de-cache<\/code> deviendra de plus en plus essentiel. <\/p>\n<p>Au fur et \u00e0 mesure que vous mettez en \u0153uvre <code>--limites-de-cache<\/code> Dans vos propres constructions Docker, tenez compte des meilleures pratiques d\u00e9crites dans cet article pour vous assurer de b\u00e9n\u00e9ficier pleinement de cette fonctionnalit\u00e9 avanc\u00e9e. Bonne construction !<\/p>","protected":false},"excerpt":{"rendered":"<p>L'option `\u2013cache-limits` 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> builds allows users to control the maximum size of the build cache. This feature enhances resource management, improving build efficiency and preventing excessive disk usage.<\/p>","protected":false},"author":1,"featured_media":2123,"parent":0,"template":"","glossary-cat":[],"class_list":["post-1405","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-limits - 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\/limites-de-cache-docker\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dockerfile -cache-limits - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"The `--cache-limits` option in Dockerfile builds allows users to control the maximum size of the build cache. This feature enhances resource management, improving build efficiency and preventing excessive disk usage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/fr\/wiki\/limites-de-cache-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.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=\"6 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-limits\/\",\"url\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/\",\"name\":\"Dockerfile -cache-limits - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg\",\"datePublished\":\"2024-07-23T12:39:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg\",\"width\":800,\"height\":600,\"caption\":\"dockerfile-cache-limits-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#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-limits\"}]},{\"@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-limits - 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\/limites-de-cache-docker\/","og_locale":"fr_FR","og_type":"article","og_title":"Dockerfile -cache-limits - Dockerpros","og_description":"The `--cache-limits` option in Dockerfile builds allows users to control the maximum size of the build cache. This feature enhances resource management, improving build efficiency and preventing excessive disk usage.","og_url":"https:\/\/dockerpros.com\/fr\/wiki\/limites-de-cache-docker\/","og_site_name":"Dockerpros","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/","url":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/","name":"Dockerfile -cache-limits - Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg","datePublished":"2024-07-23T12:39:31+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-limits_1405.jpg","width":800,"height":600,"caption":"dockerfile-cache-limits-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-limits\/#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-limits"}]},{"@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\/1405","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\/1405\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media\/2123"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media?parent=1405"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary-cat?post=1405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}