Expand description
The build context a deploy ships: the two-stage Dockerfile’s text, the staged source
tree (copy and archive) and the temp-dir helper (a <prefix>YYYYMMDD_HHMMSS__*
directory).
Structs§
- Builder
Stage - The builder stage of the generated Dockerfile.
- Entry
- One staged path, relative to the tree’s root.
- Source
Tree - The files of a source root in sorted path order, without
.git,target(at any depth) and the excluded paths.
Enums§
- Entry
Kind - What a
SourceTreeentry is.
Constants§
- RUNTIME_
IMAGE - The runtime image (glibc, Debian 12 like the
rust:*-bookwormbuilder). - TARGET_
DIR - The builder’s
cargo build --target-dir.
Functions§
- dockerfile
- The whole Dockerfile, starting with a leading newline: the builder stage, the
distroless runtime stage,
EXPOSE <server_port>, a comment andCMD ["/app/<bin>", "web", "-host", "0.0.0.0", "-port", "<server_port>"+cmd_tail+](cmd_tailis a segment list, each starting,). - make_
temp - A new directory under
basenamed<prefix>YYYYMMDD_HHMMSS__<random>withnowin local time (chrono::Local); returns the created directory (mode 0700, a random decimal suffix, retried on a name clash up to 10000 attempts).