{"id":1406,"date":"2024-07-23T12:39:31","date_gmt":"2024-07-23T12:39:31","guid":{"rendered":"https:\/\/dockerpros.com\/?post_type=glossary&#038;p=1406"},"modified":"2024-07-23T12:39:31","modified_gmt":"2024-07-23T12:39:31","slug":"dockerfile-cache-boundaries","status":"publish","type":"glossary","link":"https:\/\/dockerpros.com\/de\/wiki\/dockerfile-cache-boundaries\/","title":{"rendered":"Dockerfile \u2013cache-boundaries"},"content":{"rendered":"<h1>Understanding Dockerfile Cache Boundaries<\/h1>\n<p>Docker has revolutionized the way we build and deploy applications by providing a streamlined approach to creating reproducible environments. One of the most powerful aspects of Docker is its use of caching when building images, allowing for significant speed improvements in the build process. However, these caching mechanisms are influenced by what are known as cache boundaries, which determine how Docker evaluates whether to reuse a cached layer or rebuild it from scratch. In this article, we will delve deep into the concept of <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> cache boundaries, exploring how they work, how to optimize them, and their impact on your development workflow.<\/p>\n<h2>What Are Cache Boundaries?<\/h2>\n<p>Cache boundaries in a <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> refer to the points in the file where changes trigger Docker to invalidate its cache for that layer and all subsequent layers. Each command in a <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> creates a layer in the <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, and Docker caches these layers for future use. However, if a command&#8217;s input changes\u2014whether that&#8217;s a modification to the command itself or a change in the files it references\u2014the cache for that particular layer is invalidated, and Docker must rebuild that layer along with any layers that depend on it.<\/p>\n<p>This behavior is crucial for optimizing the build process. By understanding cache boundaries, developers can structure their Dockerfiles in such a way that minimizes unnecessary rebuilds, thereby reducing build times and improving the efficiency of continuous integration\/continuous deployment (CI\/CD) pipelines.<\/p>\n<h2>Why Cache Boundaries Matter<\/h2>\n<p>Understanding cache boundaries is essential for several reasons:<\/p>\n<ol>\n<li>\n<p><strong>Efficiency<\/strong>: By effectively managing cache layers, developers can significantly reduce build times. This is particularly important in large applications where build times can be a bottleneck.<\/p>\n<\/li>\n<li>\n<p><strong>Resource Utilization<\/strong>: Minimizing rebuilds can lead to less resource consumption on build servers, reducing costs and improving overall performance.<\/p>\n<\/li>\n<li>\n<p><strong>Consistency<\/strong>: When the cache is used effectively, developers can achieve more consistent builds, as layers are reused rather than re-executed with potential variations.<\/p>\n<\/li>\n<li>\n<p><strong>Debugging<\/strong>: Knowing where cache boundaries lie can aid in debugging build issues, allowing developers to pinpoint where changes are causing unexpected behavior.<\/p>\n<\/li>\n<\/ol>\n<h2>Basic Dockerfile Structure<\/h2>\n<p>Before diving deeper into cache boundaries, let&#8217;s review the basic structure of a <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Below is a simple example:<\/p>\n<pre><code class=\"language-Dockerfile\"># Use an official Python runtime as a parent image\nFROM python:3.9-slim\n\n# Set the working directory in the container\nWORKDIR \/app\n\n# Copy the current directory contents into the container at \/app\nCOPY . .\n\n# Install any needed packages specified in requirements.txt\nRUN pip install --no-cache-dir -r requirements.txt\n\n# Make port 80 available to the world outside this container\nEXPOSE 80\n\n# Define environment variable\nENV NAME World\n\n# Run app.py when the container launches\nCMD [\"python\", \"app.py\"]<\/code><\/pre>\n<p>In this <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, each command (<code>FROM<\/code>, <code><span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">The `WORKDIR` instruction in Dockerfile sets the working directory for subsequent instructions. It simplifies path management, as all relative paths will be resolved from this directory, enhancing build clarity.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>, <code><span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>, <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>, <code><span class=\"glossaryai-tooltip glossary-term-676\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/expose\/\" target=\"_blank\">EXPOSE<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"EXPOSE\" is a powerful tool used in various fields, including cybersecurity and software development, to identify vulnerabilities and shortcomings in systems, ensuring robust security measures are implemented.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/expose\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>, <code><span class=\"glossaryai-tooltip glossary-term-671\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/env\/\" target=\"_blank\">ENV<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">ENV, or Environmental Variables, are crucial in software development and system configuration. They store dynamic values that affect the execution environment, enabling flexible application behavior across different platforms.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/env\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>, <code><span class=\"glossaryai-tooltip glossary-term-670\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\" target=\"_blank\">CMD<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">CMD, or Command Prompt, is a command-line interpreter in Windows operating systems. It allows users to execute commands, automate tasks, and manage system files through a text-based interface.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code>) creates a new layer in the resulting <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Understanding how these commands interact with the cache is key to understanding cache boundaries.<\/p>\n<h2>Cache Invalidations and Order of Commands<\/h2>\n<p>The order of commands in a <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> significantly impacts cache invalidations. Docker evaluates layers sequentially, which means that if a command earlier in the file changes, all subsequent layers will be rebuilt. Let\u2019s analyze the previous <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> with a focus on cache boundaries:<\/p>\n<ol>\n<li>\n<p><strong>FROM<\/strong>: This instruction is the foundation of the <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Changing the base <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> will invalidate the cache for this layer and all subsequent layers.<\/p>\n<\/li>\n<li>\n<p><strong><span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">The `WORKDIR` instruction in Dockerfile sets the working directory for subsequent instructions. It simplifies path management, as all relative paths will be resolved from this directory, enhancing build clarity.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: This instruction sets the working directory but does not affect caching unless subsequent commands depend on it.<\/p>\n<\/li>\n<li>\n<p><strong><span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .<\/strong>: Copying files into the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/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\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> is a common point for cache invalidation. If any files in the current directory change, this layer will be rebuilt. <\/p>\n<\/li>\n<li>\n<p><strong><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: The <span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> command is where cache boundaries can become particularly critical. If the <code>requirements.txt<\/code> file changes, Docker will invalidate this layer and rebuild all layers that follow.<\/p>\n<\/li>\n<li>\n<p><strong><span class=\"glossaryai-tooltip glossary-term-676\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/expose\/\" target=\"_blank\">EXPOSE<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"EXPOSE\" is a powerful tool used in various fields, including cybersecurity and software development, to identify vulnerabilities and shortcomings in systems, ensuring robust security measures are implemented.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/expose\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong> and <strong><span class=\"glossaryai-tooltip glossary-term-671\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/env\/\" target=\"_blank\">ENV<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">ENV, or Environmental Variables, are crucial in software development and system configuration. They store dynamic values that affect the execution environment, enabling flexible application behavior across different platforms.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/env\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: These commands do not affect caching unless subsequent commands depend on them.<\/p>\n<\/li>\n<li>\n<p><strong><span class=\"glossaryai-tooltip glossary-term-670\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\" target=\"_blank\">CMD<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">CMD, or Command Prompt, is a command-line interpreter in Windows operating systems. It allows users to execute commands, automate tasks, and manage system files through a text-based interface.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: The <span class=\"glossaryai-tooltip glossary-term-670\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\" target=\"_blank\">CMD<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">CMD, or Command Prompt, is a command-line interpreter in Windows operating systems. It allows users to execute commands, automate tasks, and manage system files through a text-based interface.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/cmd\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> instruction defines the default command that runs when the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/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\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> starts. It does not affect <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> caching.<\/p>\n<\/li>\n<\/ol>\n<h3>Example of Cache Invalidation<\/h3>\n<p>Consider a scenario where the <code>requirements.txt<\/code> file changes. Since the <code><span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code> command comes before the <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code> command, Docker will invalidate the cache for the <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code> command and rebuild it. However, if the only change was made to a non-referenced file (e.g., a README), the cache for all subsequent layers remains intact.<\/p>\n<pre><code class=\"language-Dockerfile\"># Imagine this is our requirements.txt\nflask==1.1.2\nrequests==2.24.0<\/code><\/pre>\n<p>If you change a version in <code>requirements.txt<\/code> and rebuild the <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, the cache for the <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> pip install...<\/code> layer will be invalidated, causing Docker to reinstall all dependencies, which can be time-consuming.<\/p>\n<h2>Best Practices for Managing Cache Boundaries<\/h2>\n<p>To optimize the use of cache in Docker, consider the following best practices:<\/p>\n<h3>1. Minimize COPY\/ADD Instructions<\/h3>\n<p>Only <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">copy<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the files that are necessary for the build. Instead of copying everything with <code><span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .<\/code>, consider copying specific files first, particularly those that change less frequently:<\/p>\n<pre><code class=\"language-Dockerfile\"><span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> requirements.txt .\/\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> pip install --no-cache-dir -r requirements.txt\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .<\/code><\/pre>\n<p>This way, the installation step benefits from caching even if other files change.<\/p>\n<h3>2. Combine Commands<\/h3>\n<p>Use <code>&amp;&amp;<\/code> to combine multiple commands in a single <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code> instruction. This reduces the number of layers and helps maintain cache:<\/p>\n<pre><code class=\"language-Dockerfile\"><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> apt-get update &amp;&amp; apt-get install -y \n    package1 \n    package2 \n    &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/*<\/code><\/pre>\n<h3>3. Set Build Arguments<\/h3>\n<p>Utilize build arguments for dynamic data that may change frequently. This allows you to manage builds without affecting the cache for the entire layer:<\/p>\n<pre><code class=\"language-Dockerfile\"><span class=\"glossaryai-tooltip glossary-term-679\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/arg\/\" target=\"_blank\">ARG<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">ARG is a directive used within Dockerfiles to define build-time variables that allow you to parameterize your builds. These variables can influence how an image is constructed, enabling developers to create more flexible and reusable Docker images.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/arg\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> APP_VERSION=1.0.0\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> app-$APP_VERSION.py \/app.py<\/code><\/pre>\n<h3>4. Use Multi-Stage Builds<\/h3>\n<p>Multi-stage builds can help reduce the size of the final <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> and improve caching. You can build your application in one stage and then <span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">copy<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> only the necessary files into a smaller <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:<\/p>\n<pre><code class=\"language-Dockerfile\">FROM <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>:14 as build\n<span class=\"glossaryai-tooltip glossary-term-675\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">The `WORKDIR` instruction in Dockerfile sets the working directory for subsequent instructions. It simplifies path management, as all relative paths will be resolved from this directory, enhancing build clarity.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/workdir\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> \/app\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> package.json .\/\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> npm install\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> . .\n<span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> npm <span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> build\n\nFROM nginx:alpine\n<span class=\"glossaryai-tooltip glossary-term-673\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/copy\/\" target=\"_blank\">COPY<\/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\/de\/wiki\/copy\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> --from=build \/app\/dist \/usr\/share\/nginx\/html<\/code><\/pre>\n<h3>5. Optimize Layer Size<\/h3>\n<p>Smaller layers often lead to better caching performance. Avoid installing unnecessary packages and clean up temporary files in the same <code><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/code> command to keep layers lean.<\/p>\n<pre><code class=\"language-Dockerfile\"><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> apt-get update &amp;&amp; apt-get install -y \n    package1 \n    package2 \n    &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/*<\/code><\/pre>\n<h3>6. Use Image Tags Wisely<\/h3>\n<p>When using base images, prefer specific tags over the <code>latest<\/code> tag. Using <code>latest<\/code> can lead to unpredictable cache behavior because Docker may pull a new version of the base <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> unexpectedly:<\/p>\n<pre><code class=\"language-Dockerfile\">FROM python:3.9-slim<\/code><\/pre>\n<h3>7. Cache Busting Strategies<\/h3>\n<p>Sometimes, you may want to bust the cache intentionally to ensure that the latest versions of dependencies are used. You can do this by adding a build argument or a random string to the end of your command:<\/p>\n<pre><code class=\"language-Dockerfile\"><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> pip install --no-cache-dir -r requirements.txt?$(date +%s)<\/code><\/pre>\n<p>While this should be done cautiously, it can be useful in CI\/CD pipelines where you need to ensure the latest dependencies are pulled.<\/p>\n<h2>Debugging Cache Issues<\/h2>\n<p>Even with the best practices in place, cache issues can occasionally arise. Docker provides tools to help diagnose such issues.<\/p>\n<h3>1. Docker Build Output<\/h3>\n<p>Pay attention to the logs produced during the <code>docker build<\/code> command. If a layer is rebuilt, Docker will indicate that it is &quot;CACHED&quot; or &quot;BUILDING&quot;. This can help you identify which layer is causing cache misses.<\/p>\n<h3>2. Docker Build Kit<\/h3>\n<p>Docker <span class=\"glossaryai-tooltip glossary-term-705\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/build-kit\/\" target=\"_blank\">Build Kit<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The Build Kit is a modular construction system designed to streamline assembly processes. It incorporates standardized components, enhancing efficiency and reducing waste in various projects.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/build-kit\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> is a powerful feature that improves the build process significantly. To enable <span class=\"glossaryai-tooltip glossary-term-705\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/build-kit\/\" target=\"_blank\">Build Kit<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The Build Kit is a modular construction system designed to streamline assembly processes. It incorporates standardized components, enhancing efficiency and reducing waste in various projects.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/build-kit\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, set the environment variable <code>DOCKER_BUILDKIT=1<\/code> before running your build command. This will allow you to take advantage of advanced features such as parallel builds and better cache management.<\/p>\n<h3>3. Inspecting Layers<\/h3>\n<p>Use the <code>docker history<\/code> command to inspect the layers of a built <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. This command can provide insights into which layers may be larger than expected and which commands triggered cache invalidations.<\/p>\n<h2>Conclusion<\/h2>\n<p><span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> cache boundaries are a critical concept for any developer working with Docker. By understanding how these boundaries work and leveraging best practices, you can optimize your Docker images, reduce build times, and improve the overall efficiency of your development workflow. As Docker continues to evolve, keeping abreast of new features and techniques for managing cache will be essential for maintaining high-performance applications in a rapidly changing landscape. <\/p>\n<p>By applying the principles discussed in this article, you will be better equipped to handle complex Docker builds, ensuring a smoother and more reliable development process.<\/p>","protected":false},"excerpt":{"rendered":"<p>Die Option `\u2013cache-boundaries` in <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">Eine Dockerfile ist ein Skript, das eine Reihe von Anweisungen zur Automatisierung der Erstellung von Docker-Images enth\u00e4lt. Sie gibt das Basis-Image, die Anwendungsabh\u00e4ngigkeiten und die Konfiguration an und erm\u00f6glicht so eine konsistente Bereitstellung \u00fcber verschiedene Umgebungen hinweg.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> Baut optimiert die Zwischenspeicherung von Ebenen, indem es Grenzen f\u00fcr die Cache-Nutzung definiert. Dies erh\u00f6ht die Effizienz und stellt sicher, dass nur notwendige Ebenen neu aufgebaut werden, wodurch der Build-Prozess beschleunigt wird.<\/p>","protected":false},"author":1,"featured_media":2125,"parent":0,"template":"","glossary-cat":[],"class_list":["post-1406","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-boundaries - 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\/de\/wiki\/dockerfile-cache-boundaries\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dockerfile -cache-boundaries - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"The `--cache-boundaries` option in Dockerfile builds optimizes layer caching by defining boundaries for cache usage. This enhances efficiency, ensuring only necessary layers are rebuilt, thereby speeding up the build process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile-cache-boundaries\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.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=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"7\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/\",\"url\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/\",\"name\":\"Dockerfile -cache-boundaries - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg\",\"datePublished\":\"2024-07-23T12:39:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg\",\"width\":800,\"height\":600,\"caption\":\"dockerfile-cache-boundaries-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#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-boundaries\"}]},{\"@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\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dockerpros.com\/#organization\",\"name\":\"Dockerpros\",\"url\":\"https:\/\/dockerpros.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@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-boundaries - Dockerpros\n\nIn diesem Artikel werden wir uns mit den Cache-Grenzen in Dockerfiles befassen. Docker verwendet einen Build-Cache, um die Erstellung von Images zu beschleunigen. Wenn Sie ein Dockerfile erstellen, werden die einzelnen Anweisungen nacheinander ausgef\u00fchrt und das Ergebnis jeder Anweisung wird im Cache gespeichert. Wenn Sie das Dockerfile erneut ausf\u00fchren, \u00fcberpr\u00fcft Docker, ob sich die Anweisungen seit dem letzten Build ge\u00e4ndert haben. Wenn sich eine Anweisung ge\u00e4ndert hat, wird der Cache ung\u00fcltig und alle nachfolgenden Anweisungen werden neu ausgef\u00fchrt.\n\nEs gibt jedoch einige Anweisungen, die den Cache ung\u00fcltig machen k\u00f6nnen, auch wenn sich der Inhalt der Anweisung nicht ge\u00e4ndert hat. Diese Anweisungen werden als \"Cache-Grenzen\" bezeichnet. Wenn eine Cache-Grenze erreicht wird, wird der Cache ung\u00fcltig und alle nachfolgenden Anweisungen werden neu ausgef\u00fchrt.\n\nEinige Beispiele f\u00fcr Cache-Grenzen sind:\n\n1. ADD oder COPY Anweisungen: Wenn Sie eine Datei mit ADD oder COPY hinzuf\u00fcgen, wird der Cache ung\u00fcltig, auch wenn sich der Inhalt der Datei nicht ge\u00e4ndert hat. Dies liegt daran, dass Docker den Hash der Datei \u00fcberpr\u00fcft, um festzustellen, ob sich die Datei ge\u00e4ndert hat.\n\n2. RUN Anweisungen mit Umgebungsvariablen: Wenn Sie eine RUN Anweisung mit Umgebungsvariablen ausf\u00fchren, wird der Cache ung\u00fcltig, auch wenn sich die Umgebungsvariablen nicht ge\u00e4ndert haben. Dies liegt daran, dass Docker den Hash der Umgebungsvariablen \u00fcberpr\u00fcft, um festzustellen, ob sich die Umgebungsvariablen ge\u00e4ndert haben.\n\n3. WORKDIR Anweisungen: Wenn Sie das Arbeitsverzeichnis mit WORKDIR \u00e4ndern, wird der Cache ung\u00fcltig, auch wenn sich das Arbeitsverzeichnis nicht ge\u00e4ndert hat. Dies liegt daran, dass Docker den Hash des Arbeitsverzeichnisses \u00fcberpr\u00fcft, um festzustellen, ob sich das Arbeitsverzeichnis ge\u00e4ndert hat.\n\nUm die Effizienz des Build-Caches zu maximieren, sollten Sie versuchen, Cache-Grenzen zu vermeiden oder zumindest auf ein Minimum zu reduzieren. Hier sind einige Tipps, wie Sie dies erreichen k\u00f6nnen:\n\n1. Verwenden Sie .dockerignore Dateien: Mit .dockerignore Dateien k\u00f6nnen Sie angeben, welche Dateien und Verzeichnisse beim Erstellen des Images ignoriert werden sollen. Dadurch k\u00f6nnen Sie vermeiden, unn\u00f6tige Dateien in das Image aufzunehmen und den Cache zu verlangsamen.\n\n2. Kombinieren Sie RUN Anweisungen: Anstatt mehrere RUN Anweisungen auszuf\u00fchren, k\u00f6nnen Sie sie zu einer einzigen RUN Anweisung kombinieren. Dadurch wird der Cache nicht so oft ung\u00fcltig gemacht.\n\n3. Verwenden Sie Multi-Stage Builds: Mit Multi-Stage Builds k\u00f6nnen Sie verschiedene Phasen des Build-Prozesses in separate Stages aufteilen. Dadurch k\u00f6nnen Sie den Cache effizienter nutzen, da nur die relevanten Stages neu ausgef\u00fchrt werden m\u00fcssen, wenn sich etwas \u00e4ndert.\n\n4. Verwenden Sie Caching-Tools: Es gibt verschiedene Caching-Tools wie Docker BuildKit, die den Build-Cache optimieren und beschleunigen k\u00f6nnen.\n\nIndem Sie diese Tipps befolgen, k\u00f6nnen Sie die Effizienz des Build-Caches verbessern und die Erstellung von Docker-Images beschleunigen.","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\/de\/wiki\/dockerfile-cache-boundaries\/","og_locale":"de_DE","og_type":"article","og_title":"Dockerfile -cache-boundaries - Dockerpros","og_description":"The `--cache-boundaries` option in Dockerfile builds optimizes layer caching by defining boundaries for cache usage. This enhances efficiency, ensuring only necessary layers are rebuilt, thereby speeding up the build process.","og_url":"https:\/\/dockerpros.com\/de\/wiki\/dockerfile-cache-boundaries\/","og_site_name":"Dockerpros","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"7\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/","url":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/","name":"Dockerfile -cache-boundaries - Dockerpros\n\nIn diesem Artikel werden wir uns mit den Cache-Grenzen in Dockerfiles befassen. Docker verwendet einen Build-Cache, um die Erstellung von Images zu beschleunigen. Wenn Sie ein Dockerfile erstellen, werden die einzelnen Anweisungen nacheinander ausgef\u00fchrt und das Ergebnis jeder Anweisung wird im Cache gespeichert. Wenn Sie das Dockerfile erneut ausf\u00fchren, \u00fcberpr\u00fcft Docker, ob sich die Anweisungen seit dem letzten Build ge\u00e4ndert haben. Wenn sich eine Anweisung ge\u00e4ndert hat, wird der Cache ung\u00fcltig und alle nachfolgenden Anweisungen werden neu ausgef\u00fchrt.\n\nEs gibt jedoch einige Anweisungen, die den Cache ung\u00fcltig machen k\u00f6nnen, auch wenn sich der Inhalt der Anweisung nicht ge\u00e4ndert hat. Diese Anweisungen werden als \"Cache-Grenzen\" bezeichnet. Wenn eine Cache-Grenze erreicht wird, wird der Cache ung\u00fcltig und alle nachfolgenden Anweisungen werden neu ausgef\u00fchrt.\n\nEinige Beispiele f\u00fcr Cache-Grenzen sind:\n\n1. ADD oder COPY Anweisungen: Wenn Sie eine Datei mit ADD oder COPY hinzuf\u00fcgen, wird der Cache ung\u00fcltig, auch wenn sich der Inhalt der Datei nicht ge\u00e4ndert hat. Dies liegt daran, dass Docker den Hash der Datei \u00fcberpr\u00fcft, um festzustellen, ob sich die Datei ge\u00e4ndert hat.\n\n2. RUN Anweisungen mit Umgebungsvariablen: Wenn Sie eine RUN Anweisung mit Umgebungsvariablen ausf\u00fchren, wird der Cache ung\u00fcltig, auch wenn sich die Umgebungsvariablen nicht ge\u00e4ndert haben. Dies liegt daran, dass Docker den Hash der Umgebungsvariablen \u00fcberpr\u00fcft, um festzustellen, ob sich die Umgebungsvariablen ge\u00e4ndert haben.\n\n3. WORKDIR Anweisungen: Wenn Sie das Arbeitsverzeichnis mit WORKDIR \u00e4ndern, wird der Cache ung\u00fcltig, auch wenn sich das Arbeitsverzeichnis nicht ge\u00e4ndert hat. Dies liegt daran, dass Docker den Hash des Arbeitsverzeichnisses \u00fcberpr\u00fcft, um festzustellen, ob sich das Arbeitsverzeichnis ge\u00e4ndert hat.\n\nUm die Effizienz des Build-Caches zu maximieren, sollten Sie versuchen, Cache-Grenzen zu vermeiden oder zumindest auf ein Minimum zu reduzieren. Hier sind einige Tipps, wie Sie dies erreichen k\u00f6nnen:\n\n1. Verwenden Sie .dockerignore Dateien: Mit .dockerignore Dateien k\u00f6nnen Sie angeben, welche Dateien und Verzeichnisse beim Erstellen des Images ignoriert werden sollen. Dadurch k\u00f6nnen Sie vermeiden, unn\u00f6tige Dateien in das Image aufzunehmen und den Cache zu verlangsamen.\n\n2. Kombinieren Sie RUN Anweisungen: Anstatt mehrere RUN Anweisungen auszuf\u00fchren, k\u00f6nnen Sie sie zu einer einzigen RUN Anweisung kombinieren. Dadurch wird der Cache nicht so oft ung\u00fcltig gemacht.\n\n3. Verwenden Sie Multi-Stage Builds: Mit Multi-Stage Builds k\u00f6nnen Sie verschiedene Phasen des Build-Prozesses in separate Stages aufteilen. Dadurch k\u00f6nnen Sie den Cache effizienter nutzen, da nur die relevanten Stages neu ausgef\u00fchrt werden m\u00fcssen, wenn sich etwas \u00e4ndert.\n\n4. Verwenden Sie Caching-Tools: Es gibt verschiedene Caching-Tools wie Docker BuildKit, die den Build-Cache optimieren und beschleunigen k\u00f6nnen.\n\nIndem Sie diese Tipps befolgen, k\u00f6nnen Sie die Effizienz des Build-Caches verbessern und die Erstellung von Docker-Images beschleunigen.","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg","datePublished":"2024-07-23T12:39:31+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/dockerfile-cache-boundaries_1406.jpg","width":800,"height":600,"caption":"dockerfile-cache-boundaries-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/wiki\/dockerfile-cache-boundaries\/#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-boundaries"}]},{"@type":"WebSite","@id":"https:\/\/dockerpros.com\/#website","url":"https:\/\/dockerpros.com\/","name":"Docker-Profis","description":"DockerPros \u2013 Ihr umfassender Docker-Ressourcen-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":"de"},{"@type":"Organization","@id":"https:\/\/dockerpros.com\/#organization","name":"Docker-Profis","url":"https:\/\/dockerpros.com\/","logo":{"@type":"ImageObject","inLanguage":"de","@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\/de\/wp-json\/wp\/v2\/glossary\/1406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/glossary\/1406\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media\/2125"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media?parent=1406"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/glossary-cat?post=1406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}