use-docker-build 0.0.1

Primitive Docker build option helpers for RustUse
Documentation
  • Coverage
  • 100%
    36 out of 36 items documented1 out of 30 items with examples
  • Size
  • Source code size: 11.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 822.01 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-docker
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-docker-build

Primitive Docker build option helpers for RustUse.

This crate models build context paths, build args, target stages, platforms, and cache flags. It does not execute Docker builds.

Basic Usage

use use_docker_build::{BuildArg, BuildContext, DockerBuildOptions, DockerPlatform};

let options = DockerBuildOptions::new(BuildContext::new(".")?)
    .with_platform(DockerPlatform::new("linux", "amd64")?)
    .with_arg(BuildArg::new("RUST_LOG", "info")?);

assert_eq!(options.context().as_str(), ".");
assert_eq!(options.args()[0].key(), "RUST_LOG");
# Ok::<(), Box<dyn std::error::Error>>(())