Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| dockerfiles [2019/12/29 08:40] – [Notes] rpjday | dockerfiles [2020/01/03 11:58] (current) – [Q] rpjday | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ===== Notes ===== | ===== Notes ===== | ||
| - | * '' | + | * '' |
| * default context is current directory (" | * default context is current directory (" | ||
| + | * '' | ||
| + | * '' | ||
| ===== Q ===== | ===== Q ===== | ||
| + | * Applicability of Containerfile? | ||
| + | * COPY versus ADD? | ||
| * Does every new FROM directive start a new "build stage"? | * Does every new FROM directive start a new "build stage"? | ||
| * What is the scope of an ENV versus ARG directive? | * What is the scope of an ENV versus ARG directive? | ||
| * Can a context be a local tarball? Others? | * Can a context be a local tarball? Others? | ||
| * How to use '' | * How to use '' | ||
| + | * relevance of '' | ||
| + | * Can we display context? | ||
| ===== Usage ===== | ===== Usage ===== | ||
| + | |||
| + | Needs: | ||
| + | |||
| + | * Dockerfile/ | ||
| + | * context | ||
| < | < | ||
| Line 43: | Line 54: | ||
| * syntax (BuildKit only) | * syntax (BuildKit only) | ||
| - | ==== .dockerignore ==== | + | ==== .dockerignore |
| - | You can safely exclude '' | + | * You can safely exclude '' |
| + | * Uses Go's filepath.Match rules | ||
| + | * Also '' | ||
| + | * last match takes precedence | ||
| ===== Dockerfile directives ===== | ===== Dockerfile directives ===== | ||
| Line 56: | Line 70: | ||
| ==== FROM ==== | ==== FROM ==== | ||
| - | * Dockerfile must start with a '' | + | * Dockerfile must start with a '' |
| * sets a //base image//, initializes a new //build stage// | * sets a //base image//, initializes a new //build stage// | ||
| * can occur multiple times in a Dockerfile, perhaps to make one build stage dependent on another | * can occur multiple times in a Dockerfile, perhaps to make one build stage dependent on another | ||
| Line 96: | Line 110: | ||
| </ | </ | ||
| - | ==== COPY ==== | + | ==== COPY (preferred unless you need ADD extensions) |
| * '' | * '' | ||
| Line 131: | Line 145: | ||
| * TCP if protocol is not specified | * TCP if protocol is not specified | ||
| * use '' | * use '' | ||
| + | |||
| + | ==== HEALTHCHECK ==== | ||