{"id":1175,"date":"2024-07-22T20:45:05","date_gmt":"2024-07-22T20:45:05","guid":{"rendered":"https:\/\/dockerpros.com\/?post_type=glossary&#038;p=1175"},"modified":"2024-07-22T20:51:09","modified_gmt":"2024-07-22T20:51:09","slug":"docker-overlay2","status":"publish","type":"glossary","link":"https:\/\/dockerpros.com\/fr\/wiki\/docker-overlay2\/","title":{"rendered":"Docker Overlay2"},"content":{"rendered":"<h1>Understanding Docker Overlay2: An Advanced Overview<\/h1>\n<p>Overlay2 est le pilote de stockage par d\u00e9faut pour Docker, offrant un syst\u00e8me de fichiers en couches qui permet un stockage et une gestion efficaces des <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> images. Il est construit sur le syst\u00e8me de fichiers OverlayFS, qui permet d'empiler plusieurs syst\u00e8mes de fichiers, cr\u00e9ant ainsi une vue unifi\u00e9e. Cette capacit\u00e9 est particuli\u00e8rement avantageuse pour la conteneurisation, car elle minimise la duplication des donn\u00e9es et optimise les op\u00e9rations d'E\/S, am\u00e9liorant ainsi les performances et l'\u00e9volutivit\u00e9 des applications modernes.<\/p>\n<h2>Introduction to OverlayFS and Overlay2<\/h2>\n<p>Avant d'explorer en d\u00e9tail Overlay2, il est essentiel de comprendre OverlayFS. OverlayFS est un syst\u00e8me de fichiers union qui permet de cr\u00e9er une structure de fichiers en couches. Il se compose de deux couches principales :<\/p>\n<ol>\n<li><strong>Couche inf\u00e9rieure (lecture seule)<\/strong>: Cette couche contient les images de base qui peuvent \u00eatre partag\u00e9es entre plusieurs conteneurs.<\/li>\n<li><strong>Couche sup\u00e9rieure (lecture-\u00e9criture)<\/strong>: Ce calque contient les modifications apport\u00e9es aux images de base, y compris les ajouts, suppressions ou modifications de fichiers.<\/li>\n<\/ol>\n<p>Overlay2 improves upon its predecessor, Overlay, by supporting more extensive features and enhancing performance. Notably, Overlay2 allows for multiple lower layers, facilitating a more robust and flexible approach to managing <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> images.<\/p>\n<h2>Architecture d'Overlay2<\/h2>\n<h3>Structure en couches du syst\u00e8me de fichiers<\/h3>\n<p>The architecture of Overlay2 can be understood through its composition of layers. Each <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> is instantiated from a base <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>, generating a layered file system:<\/p>\n<ul>\n<li><strong><span class=\"glossaryai-tooltip glossary-term-739\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\" target=\"_blank\">Image Layers<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Les calques sont des composants fondamentaux dans les logiciels de conception et d'\u00e9dition graphique, permettant une manipulation non destructive des \u00e9l\u00e9ments. Chaque calque peut contenir diff\u00e9rentes images, effets ou r\u00e9glages, offrant un contr\u00f4le pr\u00e9cis sur la composition et les effets visuels.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: Each <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> layer is read-only. When a new <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> is created, Docker uses these layers to form the base of the container\u2019s filesystem.<\/li>\n<li><strong><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> Couche<\/strong>: This is a writable layer where all the changes made during the container\u2019s lifecycle are stored.<\/li>\n<\/ul>\n<p>The final view of the <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> combines these layers, presenting a unified and coherent filesystem to the application running within the <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>.<\/p>\n<h3>Differences Between Overlay and Overlay2<\/h3>\n<p>Overlay2 offre plusieurs am\u00e9liorations par rapport au pilote Overlay d'origine, notamment :<\/p>\n<ul>\n<li><strong>Support for More Lower Layers<\/strong>: Overlay2 permet un nombre illimit\u00e9 de couches inf\u00e9rieures, am\u00e9liorant la gestion des images qui d\u00e9pendent de plusieurs couches.<\/li>\n<li><strong>Performance am\u00e9lior\u00e9e<\/strong>: Overlay2 is optimized for both read and write operations, reducing latency and improving overall throughput.<\/li>\n<li><strong>Better Handling of Large Numbers of Layers<\/strong>: Overlay2 manages large numbers of layers more efficiently, which is critical in environments where images are highly layered.<\/li>\n<\/ul>\n<h2>Advantages of Using Overlay2<\/h2>\n<h3>1. Utilisation efficace du stockage<\/h3>\n<p>One of the most significant benefits of Overlay2 is its ability to share common base layers among multiple containers. Since the lower layers are read-only, they do not occupy additional disk space for each <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>. This efficiency extends to updates; if multiple containers share the same <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>, only the upper layer needs to be modified, conserving space and resources.<\/p>\n<h3>2. Optimisation des performances<\/h3>\n<p>L'architecture d'Overlay2 est con\u00e7ue pour optimiser les performances. L'utilisation de la structure de couches OverlayFS permet de r\u00e9duire les op\u00e9rations d'E\/S, en particulier dans les sc\u00e9narios \u00e0 forte demande de lecture et d'\u00e9criture. Le pilote minimise la n\u00e9cessit\u00e9 de dupliquer les fichiers entre les couches, ce qui se traduit par des temps d'acc\u00e8s plus rapides et une meilleure r\u00e9activit\u00e9 des applications.<\/p>\n<h3>3. Improved Layer Management<\/h3>\n<p>Avec Overlay2, la capacit\u00e9 \u00e0 g\u00e9rer une plus grande <span class=\"glossaryai-tooltip glossary-term-682\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/stack\/\" target=\"_blank\">pile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Une pile est une structure de donn\u00e9es qui fonctionne selon le principe du dernier entr\u00e9, premier sorti (LIFO), o\u00f9 l'\u00e9l\u00e9ment le plus r\u00e9cemment ajout\u00e9 est le premier \u00e0 \u00eatre retir\u00e9. Elle prend en charge deux op\u00e9rations principales : empiler et d\u00e9piler.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/stack\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> of layers means that developers can build applications with greater modularity. Each change can be encapsulated in its layer, simplifying debugging and version control.<\/p>\n<h3>4. Prise en charge native des fichiers volumineux<\/h3>\n<p>Overlay2 a des capacit\u00e9s am\u00e9lior\u00e9es pour la gestion de fichiers volumineux par rapport \u00e0 son pr\u00e9d\u00e9cesseur. Cette am\u00e9lioration garantit que les applications traitant des ensembles de donn\u00e9es importants peuvent <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> plus facilement dans des environnements conteneuris\u00e9s.<\/p>\n<h2>Configuration and Usage of Overlay2<\/h2>\n<h3>Activation d'Overlay2<\/h3>\n<p>To use Overlay2 as your storage driver, you can specify it in your Docker <span class=\"glossaryai-tooltip glossary-term-667\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\" target=\"_blank\">d\u00e9mon<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Un d\u00e9mon est un processus d'arri\u00e8re-plan en informatique qui s'ex\u00e9cute de mani\u00e8re autonome, effectuant des t\u00e2ches sans intervention de l'utilisateur. Il g\u00e8re g\u00e9n\u00e9ralement des fonctions au niveau du syst\u00e8me ou de l'application, am\u00e9liorant ainsi l'efficacit\u00e9.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> fichier de configuration. Voici un exemple de configuration de base :<\/p>\n<pre><code class=\"language-json\">{\n  \"storage-driver\": \"overlay2\"\n}<\/code><\/pre>\n<h3>V\u00e9rification du pilote de stockage actuel<\/h3>\n<p>To confirm which storage driver Docker is currently using, you can execute the following command:<\/p>\n<pre><code class=\"language-bash\">docker info | grep \"Storage Driver\"<\/code><\/pre>\n<p>Cette commande renverra le pilote de stockage utilis\u00e9, vous permettant de v\u00e9rifier qu'Overlay2 est correctement configur\u00e9.<\/p>\n<h3>R\u00e9glage des performances<\/h3>\n<p>While Overlay2 is designed for optimal performance, you can further tune its settings. Some common performance tuning techniques include:<\/p>\n<ul>\n<li>\n<p><strong>Increasing Inodes<\/strong>: In some scenarios, especially when dealing with many small files, the default inode size may not be sufficient. You can adjust this during the creation of the underlying filesystem.<\/p>\n<\/li>\n<li>\n<p><strong>Choix du syst\u00e8me de fichiers<\/strong>: The performance of Overlay2 can also depend on the underlying file system. Ext4, XFS, and Btrfs are commonly used with Overlay2, each offering different performance characteristics.<\/p>\n<\/li>\n<\/ul>\n<h2>Troubleshooting Overlay2<\/h2>\n<p>Despite its advantages, users may encounter issues when working with Overlay2. Here are some common problems and their potential solutions:<\/p>\n<h3>1. Utilisation \u00e9lev\u00e9e du disque<\/h3>\n<p>Si vous remarquez que l'utilisation du disque est anormalement \u00e9lev\u00e9e, inspectez le nombre de couches et la taille de chaque couche en utilisant :<\/p>\n<pre><code class=\"language-bash\">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> ls\ndocker system df<\/code><\/pre>\n<p>Consider reducing the number of layers by optimizing your Dockerfiles for smaller <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> sizes.<\/p>\n<h3>2. Goulets d'\u00e9tranglement de performance<\/h3>\n<p>If you experience sluggish performance, assess the underlying filesystem. Tools like <code>iostat<\/code> and <code>vmstat<\/code> peut aider \u00e0 identifier les goulots d'\u00e9tranglement d'entr\u00e9e\/sortie. De plus, assurez-vous que votre stockage est correctement provisionn\u00e9 pour r\u00e9pondre aux exigences de vos applications.<\/p>\n<h3>3. Container Startup Failures<\/h3>\n<p>Sometimes, containers may fail to start due to issues with Overlay2. You can check the logs of the Docker <span class=\"glossaryai-tooltip glossary-term-667\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\" target=\"_blank\">d\u00e9mon<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Un d\u00e9mon est un processus d'arri\u00e8re-plan en informatique qui s'ex\u00e9cute de mani\u00e8re autonome, effectuant des t\u00e2ches sans intervention de l'utilisateur. Il g\u00e8re g\u00e9n\u00e9ralement des fonctions au niveau du syst\u00e8me ou de l'application, am\u00e9liorant ainsi l'efficacit\u00e9.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/daemon\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> for any error messages related to Overlay2:<\/p>\n<pre><code class=\"language-bash\">journalctl -u docker.service<\/code><\/pre>\n<p>Recherchez les erreurs li\u00e9es aux autorisations d'acc\u00e8s aux fichiers ou \u00e0 la gestion des calques.<\/p>\n<h2>Best Practices for Using Overlay2<\/h2>\n<h3>1. Optimisez votre Dockerfile<\/h3>\n<p>To leverage the full capabilities of Overlay2, write efficient Dockerfiles. Use multi-stage builds to minimize the number of layers and reduce <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> size. Each command 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> g\u00e9n\u00e8re un nouveau calque ; par cons\u00e9quent, combinez les commandes lorsque c'est possible.<\/p>\n<h3>2. Nettoyage r\u00e9gulier<\/h3>\n<p>Nettoyez p\u00e9riodiquement les images et conteneurs inutilis\u00e9s pour lib\u00e9rer de l'espace. Vous pouvez utiliser la commande suivante pour supprimer les images orphelines :<\/p>\n<pre><code class=\"language-bash\"><span class=\"glossaryai-tooltip glossary-term-1237\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-image-prune\/\" target=\"_blank\">docker image prune<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Docker Image Prune is a command used to remove unused and dangling images from the local Docker environment. This helps to free up disk space and maintain an efficient development workflow.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-image-prune\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code><\/pre>\n<p>For a more thorough cleanup, you might consider:<\/p>\n<pre><code class=\"language-bash\">docker system prune --all<\/code><\/pre>\n<h3>3. Monitor Layer Size<\/h3>\n<p>Keep an eye on the size of your <span class=\"glossaryai-tooltip glossary-term-739\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\" target=\"_blank\">couches d'image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Les calques sont des composants fondamentaux dans les logiciels de conception et d'\u00e9dition graphique, permettant une manipulation non destructive des \u00e9l\u00e9ments. Chaque calque peut contenir diff\u00e9rentes images, effets ou r\u00e9glages, offrant un contr\u00f4le pr\u00e9cis sur la composition et les effets visuels.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Use Docker\u2019s built-in commands to analyze <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> sizes and adjust 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> as necessary.<\/p>\n<h3>4. Configurer correctement le backend de stockage<\/h3>\n<p>Select an appropriate storage backend for your use case. Overlay2 performs best on modern file systems like ext4 or XFS. Make sure to format your storage according to the requirements of Overlay2.<\/p>\n<h2>Conclusion<\/h2>\n<p>Comprendre Docker Overlay2 est essentiel pour toute personne souhaitant optimiser ses applications conteneuris\u00e9es. L'efficacit\u00e9, les am\u00e9liorations de performances et la flexibilit\u00e9 offertes par Overlay2 en font le pilote de stockage privil\u00e9gi\u00e9 pour de nombreuses organisations. En exploitant ses capacit\u00e9s avanc\u00e9es, les d\u00e9veloppeurs peuvent cr\u00e9er des applications plus robustes et efficaces tout en minimisant la consommation de ressources.<\/p>\n<p>As <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> technology continues to evolve, Overlay2 will remain a key player in the landscape of <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> storage solutions. By adhering to best practices and understanding the underlying architecture, developers can maximize the benefits of Overlay2 within their Docker environments.<\/p>","protected":false},"excerpt":{"rendered":"<p>Docker Overlay2 is a storage driver that uses overlay filesystem capabilities to efficiently manage <span class=\"glossaryai-tooltip glossary-term-739\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\" target=\"_blank\">couches d'image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Les calques sont des composants fondamentaux dans les logiciels de conception et d'\u00e9dition graphique, permettant une manipulation non destructive des \u00e9l\u00e9ments. Chaque calque peut contenir diff\u00e9rentes images, effets ou r\u00e9glages, offrant un contr\u00f4le pr\u00e9cis sur la composition et les effets visuels.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/fr\/wiki\/image-layers\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> and <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> filesystems. It enhances performance and reduces disk space usage by leveraging a layered architecture.<\/p>","protected":false},"author":1,"featured_media":1667,"parent":0,"template":"","glossary-cat":[],"class_list":["post-1175","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>Docker Overlay2 - 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\/docker-overlay2\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Overlay2 - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"Docker Overlay2 is a storage driver that uses overlay filesystem capabilities to efficiently manage image layers and container filesystems. It enhances performance and reduces disk space usage by leveraging a layered architecture.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/fr\/wiki\/docker-overlay2\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-22T20:51:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.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\/docker-overlay2\/\",\"url\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/\",\"name\":\"Docker Overlay2 - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg\",\"datePublished\":\"2024-07-22T20:45:05+00:00\",\"dateModified\":\"2024-07-22T20:51:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg\",\"width\":800,\"height\":600,\"caption\":\"docker-overlay2-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#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\":\"Docker Overlay2\"}]},{\"@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":"Docker Overlay2 - 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\/docker-overlay2\/","og_locale":"fr_FR","og_type":"article","og_title":"Docker Overlay2 - Dockerpros","og_description":"Docker Overlay2 is a storage driver that uses overlay filesystem capabilities to efficiently manage image layers and container filesystems. It enhances performance and reduces disk space usage by leveraging a layered architecture.","og_url":"https:\/\/dockerpros.com\/fr\/wiki\/docker-overlay2\/","og_site_name":"Dockerpros","article_modified_time":"2024-07-22T20:51:09+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.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\/docker-overlay2\/","url":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/","name":"Docker Overlay2 - Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg","datePublished":"2024-07-22T20:45:05+00:00","dateModified":"2024-07-22T20:51:09+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/wiki\/docker-overlay2\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/docker-overlay2_1175.jpg","width":800,"height":600,"caption":"docker-overlay2-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/wiki\/docker-overlay2\/#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":"Docker Overlay2"}]},{"@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\/1175","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\/1175\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media\/1667"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/media?parent=1175"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/dockerpros.com\/fr\/wp-json\/wp\/v2\/glossary-cat?post=1175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}