use-dockerfile 0.0.1

Primitive Dockerfile instruction line helpers for RustUse
Documentation
  • Coverage
  • 100%
    43 out of 43 items documented1 out of 24 items with examples
  • Size
  • Source code size: 12.41 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 578.86 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-dockerfile

Primitive Dockerfile instruction line helpers for RustUse.

This crate parses and renders single Dockerfile instruction lines. It does not try to evaluate Dockerfile semantics, handle line continuations, or build images.

Basic Usage

use use_dockerfile::{DockerfileInstruction, DockerfileInstructionKind};

let instruction: DockerfileInstruction = "FROM rust:1.95".parse()?;
let run = DockerfileInstruction::run("cargo test");

assert_eq!(instruction.kind(), DockerfileInstructionKind::From);
assert_eq!(run.to_string(), "RUN cargo test");
# Ok::<(), Box<dyn std::error::Error>>(())