Expand description
§dofigen_lib
dofigen_lib help creating Dockerfile with a simplified structure and made to cache the build with Buildkit.
You also can parse the structure from YAML or JSON.
use dofigen_lib::*;
use pretty_assertions_sorted::assert_eq_sorted;
let mut context = DofigenContext::new();
let dofigen = context.parse_from_string(r#"
fromImage:
path: ubuntu
"#).unwrap();
let dockerfile = generate_dockerfile(&dofigen).unwrap();Modules§
Structs§
- Represents the ADD instruction in a Dockerfile file from URLs or uncompress an archive.
- Represents the ADD instruction in a Dockerfile specific for Git repo. See https://docs.docker.com/reference/dockerfile/#adding-private-git-repositories
- Represents file system binding during a run See https://docs.docker.com/reference/dockerfile/#run—mounttypebind
- Represents a cache definition during a run See https://docs.docker.com/reference/dockerfile/#run—mounttypecache
- Represents the COPY instruction in a Dockerfile. See https://docs.docker.com/reference/dockerfile/#copy
- Represents the options of a COPY/ADD instructions
- Represents the Dockerfile main stage
- The representation of the Dofigen execution context
- Represents the Dockerfile healthcheck instruction See https://docs.docker.com/reference/dockerfile/#healthcheck
- Represents a Docker image name
- One or many values
- A struct that can be parsed from a string
- Represents a port definition
- Represents a run command
- Represents a Dockerfile stage
- Represents user and group definition
- Patch for Vec
that handle some commands based on the position: - Patch for Vec
that handle some commands based on the position:
Enums§
- Represents a cache sharing strategy
- Represents a copy origin
- Represents a Docker image version
- Represents a port protocol
- Represents a resource
Functions§
- Generates the Dockerfile content from a Dofigen struct.
- Generates the .dockerignore file content from an Dofigen struct.
- Generates the effective Dofigen content from a Dofigen struct.