{"id":220,"date":"2024-07-21T11:45:27","date_gmt":"2024-07-21T11:45:27","guid":{"rendered":"https:\/\/dockerpros.com\/?p=220"},"modified":"2024-07-21T11:45:27","modified_gmt":"2024-07-21T11:45:27","slug":"wie-reduziere-ich-die-grose-von-docker-imagesverwende-kleinere-basis-images-z-b-alpine-statt-ubuntu-nutze-mehrstufige-builds-um-nur-die-notwendigen-laufzeitdateien-zu-kopieren-kombiniere","status":"publish","type":"post","link":"https:\/\/dockerpros.com\/de\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/","title":{"rendered":"Wie kann ich die Gr\u00f6\u00dfe von Docker-Images reduzieren?\n\nUm die Gr\u00f6\u00dfe von Docker-Images zu reduzieren, k\u00f6nnen Sie die folgenden Schritte ausf\u00fchren:\n\n1. Verwenden Sie eine minimale Basis-Image: W\u00e4hlen Sie eine minimale Basis-Image wie Alpine Linux, die nur die notwendigen Pakete und Abh\u00e4ngigkeiten enth\u00e4lt.\n\n2. Entfernen Sie unn\u00f6tige Pakete und Abh\u00e4ngigkeiten: Entfernen Sie alle unn\u00f6tigen Pakete und Abh\u00e4ngigkeiten, die nicht f\u00fcr Ihre Anwendung erforderlich sind.\n\n3. Verwenden Sie .dockerignore: Verwenden Sie eine .dockerignore-Datei, um unn\u00f6tige Dateien und Verzeichnisse aus dem Build-Kontext auszuschlie\u00dfen.\n\n4. Verwenden Sie Multi-Stage-Builds: Verwenden Sie Multi-Stage-Builds, um die Gr\u00f6\u00dfe des endg\u00fcltigen Images zu reduzieren, indem Sie nur die notwendigen Artefakte aus den vorherigen Stages kopieren.\n\n5. Verwenden Sie Layer-Caching: Verwenden Sie Layer-Caching, um die Gr\u00f6\u00dfe des Images zu reduzieren, indem Sie nur die ge\u00e4nderten Layer neu erstellen.\n\n6. Verwenden Sie komprimierte Images: Verwenden Sie komprimierte Images, um die Gr\u00f6\u00dfe des Images zu reduzieren.\n\n7. Verwenden Sie eine minimale Shell: Verwenden Sie eine minimale Shell wie sh anstelle von bash, um die Gr\u00f6\u00dfe des Images zu reduzieren.\n\n8. Verwenden Sie eine minimale Sprache: Verwenden Sie eine minimale Sprache wie Go anstelle von Java, um die Gr\u00f6\u00dfe des Images zu reduzieren.\n\n9. Verwenden Sie eine minimale Datenbank: Verwenden Sie eine minimale Datenbank wie SQLite anstelle von MySQL, um die Gr\u00f6\u00dfe des Images zu reduzieren.\n\n10. Verwenden Sie eine minimale Anwendung: Verwenden Sie eine minimale Anwendung, die nur die notwendigen Funktionen enth\u00e4lt, um die Gr\u00f6\u00dfe des Images zu reduzieren.\n\nDurch die Anwendung dieser Schritte k\u00f6nnen Sie die Gr\u00f6\u00dfe Ihrer Docker-Images erheblich reduzieren und die Leistung und Effizienz Ihrer Anwendungen verbessern."},"content":{"rendered":"<h1>How to Reduce the Size of Docker Images: Techniques and Best Practices<\/h1>\n<p>Docker has revolutionized the software development process by allowing developers to package applications and their dependencies into containers. However, as the use of Docker has grown, so has the concern about the size of Docker images. Larger images can lead to increased storage costs, slower deployment times, and longer build processes. In this article, we will explore advanced techniques and best practices for reducing the size of Docker images, ensuring more efficient resource usage.<\/p>\n<h2>Understanding Docker Image Layers<\/h2>\n<p>Before diving into the strategies for reducing Docker <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> sizes, it is essential to understand how Docker images are constructed. Docker images are made up of a series of read-only layers. Each layer represents a set of changes made to the previous layer and is created from a command in the <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>. When you build an <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>, Docker caches each layer to speed up subsequent builds. <\/p>\n<p>The layers are stored as a union filesystem, meaning that only the differences between layers are stored on disk. This makes it possible to share layers across different images. However, it also means that a poorly constructed <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> can lead to unnecessarily large images with many redundant layers.<\/p>\n<h2>Best Practices for Reducing Docker Image Sizes<\/h2>\n<h3>1. Choose the Right Base Image<\/h3>\n<p>The choice of 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> significantly impacts the size of your final Docker <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>. Using a minimal 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> can lead to smaller images overall. For example, instead of using <code>ubuntu<\/code> or <code>alpine<\/code>, consider using an even smaller 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> like <code>scratch<\/code>. If you require more features, <code>alpine<\/code> is a popular choice as it is much smaller than traditional distributions.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-dockerfile\">FROM alpine:3.15<\/code><\/pre>\n<h3>2. Minimize the Number of Layers<\/h3>\n<p>Each instruction 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 new layer. To reduce 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> size, combine commands where possible. You can achieve this by chaining 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.<\/p>\n<p><strong>Example:<\/strong><\/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; \n    apt-get install -y package1 package2 package3 &amp;&amp; \n    apt-get clean &amp;&amp; \n    rm -rf \/var\/lib\/apt\/lists\/*<\/code><\/pre>\n<p>This example runs the <code>apt-get<\/code> commands in a single layer, reducing the number of layers created.<\/p>\n<h3>3. Use Multi-Stage Builds<\/h3>\n<p>Multi-stage builds allow you to separate the build environment from the production environment. You can use one stage to compile your application and another to create 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> with only the necessary artifacts.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-dockerfile\"># Build stage\nFROM golang:1.17 AS builder\nWORKDIR \/app\nCOPY . .\nRUN go build -o myapp\n\n# Production stage\nFROM alpine:3.15\nWORKDIR \/app\nCOPY --from=builder \/app\/myapp .\nCMD [\".\/myapp\"]<\/code><\/pre>\n<p>In this example, 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> contains only the compiled binary, significantly reducing the size.<\/p>\n<h3>4. Clean Up After Installation<\/h3>\n<p>When installing packages, temporary files and caches are often left behind, contributing unnecessary weight to 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>. Always clean up after installation by removing caches or unnecessary files.<\/p>\n<p><strong>Example:<\/strong><\/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; \n    apt-get install -y package1 &amp;&amp; \n    apt-get clean &amp;&amp; \n    rm -rf \/var\/lib\/apt\/lists\/*<\/code><\/pre>\n<h3>5. Use <code>.dockerignore<\/code> File<\/h3>\n<p>The <code>.dockerignore<\/code> file is used to exclude files and directories from the build context. This helps prevent unnecessary files from being copied into 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>, keeping it lean.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code>node_modules\n*.log\nDockerfile\n.git<\/code><\/pre>\n<h3>6. Optimize Application Dependencies<\/h3>\n<p>Review your application dependencies to ensure that no unnecessary packages are included in your <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 is particularly important for languages like <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>.js or Python, where dependencies can be extensive. Use tools like <code>npm prune<\/code> or <code>pip freeze<\/code> to keep your dependencies in check.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-dockerfile\"># Node.js Example\nFROM node:14\nWORKDIR \/app\nCOPY package.json package-lock.json .\/\nRUN npm install --production\nCOPY . .\nCMD [\"node\", \"server.js\"]<\/code><\/pre>\n<h3>7. Compress Your Images<\/h3>\n<p>Docker supports <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> compression, which can help reduce the size 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> on disk. The <code>docker build<\/code> command can use compression when creating images. To enable compression, you can pass the <code>--compress<\/code> flag.<\/p>\n<pre><code class=\"language-bash\">docker build --compress -t myimage:latest .<\/code><\/pre>\n<h3>8. Use Specific Tags for Base Images<\/h3>\n<p>When specifying base images, always use specific version numbers or tags instead of <code>latest<\/code>. This practice not only helps with reproducibility but also enables you to control when and how upgrades occur.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-dockerfile\">FROM ubuntu:20.04<\/code><\/pre>\n<h3>9. Analyze Image Size<\/h3>\n<p>Use tools like <code>dive<\/code> or <code>docker-squash<\/code> to analyze and visualize your <span class=\"glossaryai-tooltip glossary-term-739\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/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\">Image layers are fundamental components in graphic design and editing software, allowing for the non-destructive manipulation of elements. Each layer can contain different images, effects, or adjustments, enabling precise control over composition and visual effects.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image-layers\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. This will help you identify any large layers or unnecessary files in your images that can be optimized.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-bash\">dive myimage:latest<\/code><\/pre>\n<h3>10. Use Docker Squash<\/h3>\n<p>Docker Squash is a technique that allows you to combine multiple layers into a single layer. This can significantly reduce 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> size by eliminating redundant layers.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-bash\">docker build --squash -t myimage:latest .<\/code><\/pre>\n<h3>11. Use Scratch for Binaries<\/h3>\n<p>If your application doesn&#8217;t require a full OS, you can build your Docker <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> using <code>scratch<\/code>, which is an empty 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>. This is particularly useful for statically compiled binaries.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><code class=\"language-dockerfile\">FROM scratch\nCOPY myapp \/myapp\nCMD [\"\/myapp\"]<\/code><\/pre>\n<h3>12. Avoid Unused Packages<\/h3>\n<p>In a development environment, you may install packages for debugging or testing purposes. However, in production, only the necessary packages should be installed. Be sure to remove any unused packages from your 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>.<\/p>\n<h3>13. Disable Cache for Non-Production Builds<\/h3>\n<p>While building images, Docker caches each layer. For non-production builds, you can disable caching to ensure that each layer is rebuilt, potentially leading to a cleaner and 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-bash\">docker build --no-cache -t myimage:latest .<\/code><\/pre>\n<h3>14. Monitor and Maintain Regularly<\/h3>\n<p>Finally, <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> maintenance should not be a one-off <span class=\"glossaryai-tooltip glossary-term-683\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/task\/\" target=\"_blank\">task<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A task is a specific piece of work or duty assigned to an individual or system. It encompasses defined objectives, required resources, and expected outcomes, facilitating structured progress in various contexts.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/task\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Regularly review and optimize your Docker images as part of your development lifecycle. Remove old images and unused layers to keep your environment clean.<\/p>\n<h2>Conclusion<\/h2>\n<p>Reducing the size of Docker images is crucial for enhancing performance, speeding up deployment, and conserving storage resources. By implementing these advanced techniques and best practices, developers can create efficient, lightweight Docker images. Understanding the underlying principles and maintaining a focus on optimization can lead to a more sustainable and manageable containerized environment.<\/p>\n<p>By continuously monitoring and refining your Docker images, you can ensure that your applications remain agile and scalable, aligning with the ever-evolving demands of modern software development. With a commitment to Docker best practices, you can enjoy the full benefits of containerization without the drawbacks of large, unwieldy images.<\/p>","protected":false},"excerpt":{"rendered":"<p>Um Docker zu reduzieren <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\" target=\"_blank\">Bild<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Ein Bild ist eine visuelle Darstellung eines Objekts oder einer Szene, die typischerweise aus Pixeln in digitalen Formaten besteht. Es kann Informationen vermitteln, Emotionen hervorrufen und die Kommunikation \u00fcber verschiedene Medien hinweg erleichtern.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> Gr\u00f6\u00dfe, nutzen Sie mehrstufige Builds, optimieren Sie Ihre <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> by minimizing layers, and remove unnecessary files. Consider using lighter base images like Alpine.<\/p>","protected":false},"author":1,"featured_media":296,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimization-and-best-practices"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do I reduce the size of Docker images? - 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\/optimization-and-best-practices\/wie-reduziere-ich-die-grose-von-docker-imagesverwende-kleinere-basis-images-z-b-alpine-statt-ubuntu-nutze-mehrstufige-builds-um-nur-die-notwendigen-laufzeitdateien-zu-kopieren-kombiniere\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do I reduce the size of Docker images? - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"To reduce Docker image size, utilize multi-stage builds, optimize your Dockerfile by minimizing layers, and remove unnecessary files. Consider using lighter base images like Alpine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/de\/optimization-and-best-practices\/wie-reduziere-ich-die-grose-von-docker-imagesverwende-kleinere-basis-images-z-b-alpine-statt-ubuntu-nutze-mehrstufige-builds-um-nur-die-notwendigen-laufzeitdateien-zu-kopieren-kombiniere\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-21T11:45:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.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=\"author\" content=\"dockerpros\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"dockerpros\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"5\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/\"},\"author\":{\"name\":\"dockerpros\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4\"},\"headline\":\"How do I reduce the size of Docker images?\",\"datePublished\":\"2024-07-21T11:45:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/\"},\"wordCount\":876,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dockerpros.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg\",\"articleSection\":[\"Optimization and Best Practices\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/\",\"url\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/\",\"name\":\"How do I reduce the size of Docker images? - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg\",\"datePublished\":\"2024-07-21T11:45:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg\",\"width\":800,\"height\":600,\"caption\":\"how-do-i-reduce-the-size-of-docker-images-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dockerpros.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How do I reduce the size of Docker images?\"}]},{\"@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\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4\",\"name\":\"dockerpros\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1783601465\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1783601465\",\"caption\":\"dockerpros\"},\"sameAs\":[\"https:\/\/dockerpros.com\/\"],\"url\":\"https:\/\/dockerpros.com\/de\/author\/dockerpros\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Wie verringere ich die Gr\u00f6\u00dfe von Docker-Images? \u2013 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\/de\/optimization-and-best-practices\/wie-reduziere-ich-die-grose-von-docker-imagesverwende-kleinere-basis-images-z-b-alpine-statt-ubuntu-nutze-mehrstufige-builds-um-nur-die-notwendigen-laufzeitdateien-zu-kopieren-kombiniere\/","og_locale":"de_DE","og_type":"article","og_title":"How do I reduce the size of Docker images? - Dockerpros","og_description":"To reduce Docker image size, utilize multi-stage builds, optimize your Dockerfile by minimizing layers, and remove unnecessary files. Consider using lighter base images like Alpine.","og_url":"https:\/\/dockerpros.com\/de\/optimization-and-best-practices\/wie-reduziere-ich-die-grose-von-docker-imagesverwende-kleinere-basis-images-z-b-alpine-statt-ubuntu-nutze-mehrstufige-builds-um-nur-die-notwendigen-laufzeitdateien-zu-kopieren-kombiniere\/","og_site_name":"Dockerpros","article_published_time":"2024-07-21T11:45:27+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg","type":"image\/jpeg"}],"author":"dockerpros","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"dockerpros","Gesch\u00e4tzte Lesezeit":"5\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#article","isPartOf":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/"},"author":{"name":"dockerpros","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4"},"headline":"How do I reduce the size of Docker images?","datePublished":"2024-07-21T11:45:27+00:00","mainEntityOfPage":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/"},"wordCount":876,"commentCount":0,"publisher":{"@id":"https:\/\/dockerpros.com\/#organization"},"image":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg","articleSection":["Optimization and Best Practices"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/","url":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/","name":"Wie verringere ich die Gr\u00f6\u00dfe von Docker-Images? \u2013 Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg","datePublished":"2024-07-21T11:45:27+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/how-do-i-reduce-the-size-of-docker-images_220.jpg","width":800,"height":600,"caption":"how-do-i-reduce-the-size-of-docker-images-2"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/optimization-and-best-practices\/how-do-i-reduce-the-size-of-docker-images\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dockerpros.com\/"},{"@type":"ListItem","position":2,"name":"How do I reduce the size of Docker images?"}]},{"@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\/"}},{"@type":"Person","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4","name":"dockerpros","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/image\/","url":"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1783601465","contentUrl":"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1783601465","caption":"dockerpros"},"sameAs":["https:\/\/dockerpros.com\/"],"url":"https:\/\/dockerpros.com\/de\/author\/dockerpros\/"}]}},"_links":{"self":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/comments?post=220"}],"version-history":[{"count":0,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts\/220\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media\/296"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media?parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/categories?post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/tags?post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}