.dockerignore: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:


⚠️ If a file or directory matches one of the <code>.dockerignore</code> patterns, it will not be possible to add it to the image with <code>COPY</code>.
⚠️ If a file or directory matches one of the <code>.dockerignore</code> patterns, it will not be possible to add it to the image with <code>COPY</code>.
<syntaxhighlight lang='text'>
=> ERROR [2/4] COPY ./common/docker/VERSION-base /automation                0.0s
------
> [2/4] COPY ./common/docker/VERSION-base /automation:
------
failed to compute cache key: "/common/docker/VERSION-base" not found: not found
</syntaxhighlight>

Revision as of 23:12, 2 May 2022

External

Internal

Overview

Contains files and directories from the build context that won't be uploaded to the docker host when the image is built. .dockerignore supports exclusion patterns similar to .gitignore.

⚠️ If a file or directory matches one of the .dockerignore patterns, it will not be possible to add it to the image with COPY.

 => ERROR [2/4] COPY ./common/docker/VERSION-base /automation                0.0s
------
 > [2/4] COPY ./common/docker/VERSION-base /automation:
------
failed to compute cache key: "/common/docker/VERSION-base" not found: not found