Skip to main content

Module stage

Module stage 

Source
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§

BuilderStage
The builder stage of the generated Dockerfile.
Entry
One staged path, relative to the tree’s root.
SourceTree
The files of a source root in sorted path order, without .git, target (at any depth) and the excluded paths.

Enums§

EntryKind
What a SourceTree entry is.

Constants§

RUNTIME_IMAGE
The runtime image (glibc, Debian 12 like the rust:*-bookworm builder).
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 and CMD ["/app/<bin>", "web", "-host", "0.0.0.0", "-port", "<server_port>" + cmd_tail + ] (cmd_tail is a segment list, each starting , ).
make_temp
A new directory under base named <prefix>YYYYMMDD_HHMMSS__<random> with now in local time (chrono::Local); returns the created directory (mode 0700, a random decimal suffix, retried on a name clash up to 10000 attempts).