Expand description
A task’s build context, and reading one from a directory (#221, IMAGE-7).
Structs§
- Build
Context - A build context: the files beside the Dockerfile in the artifact, sorted by name.
- Context
Entry - One file of a build context: its path relative to the context root, its mode, and its bytes.
- Ignore
Rules - The patterns of a
.dockerignorefile, applied the way Docker applies them.
Constants§
- DAEMON_
ENTRY - The artifact’s daemon entry, which no context file may take.
- DOCKERFILE_
ENTRY - The artifact’s Dockerfile entry, which the caller’s Dockerfile fills.
- IGNORE_
FILES - The ignore files, in precedence order.
- MAX_
CONTEXT_ BYTES - S3’s maximum object size for a single
PutObject, 5 GiB, which is how the artifact is uploaded. A context bigger than that cannot be uploaded at all, so it is refused while it is read rather than after it is zipped in memory.
Functions§
- from_
dir - Reads
diras a build context: every regular file its ignore rules leave in, with the rootDockerfileand ignore files left out and symlinks skipped with a warning. - glob_
match - Whether
pathmatches the.dockerignoreglobpattern, taken as written (already cleaned). A malformed pattern matches nothing.