Docker Concepts

.dockerignore

Filter build inputs using patterns at the root of the context. Special recipe and ignore files can still be needed by the builder when excluded from COPY. Existing images are unchanged. Keep real secrets out of the context regardless of ignore rules. Recipe-specific ignore files take precedence over the root file; keep confidential inputs outside the context.

Formal Syntax & Structure

docker syntaxdocker
# one exclusion pattern per line

Working Example

Example Snippetdocker
*.tmpDockerfile.dockerignore
Docker Reference