pub struct DockerComposer { /* private fields */ }Expand description
Composes multiple Docker layers into a complete Dockerfile
Implementations§
Source§impl DockerComposer
impl DockerComposer
Sourcepub fn new(template_manager: DockerTemplateManager) -> Self
pub fn new(template_manager: DockerTemplateManager) -> Self
Creates a new DockerComposer
Sourcepub fn compose(
&self,
config: &DockerImageConfig,
project_root: Option<&Path>,
) -> Result<ComposedDockerfile>
pub fn compose( &self, config: &DockerImageConfig, project_root: Option<&Path>, ) -> Result<ComposedDockerfile>
Compose a complete Dockerfile and associated files from the given configuration
Sourcepub fn validate_dockerfile(&self, content: &str) -> Result<()>
pub fn validate_dockerfile(&self, content: &str) -> Result<()>
Validate that a composed Dockerfile is valid
Sourcepub fn write_to_directory(
&self,
composed: &ComposedDockerfile,
output_dir: &Path,
) -> Result<()>
pub fn write_to_directory( &self, composed: &ComposedDockerfile, output_dir: &Path, ) -> Result<()>
Write composed Dockerfile and associated files to a directory
Auto Trait Implementations§
impl Freeze for DockerComposer
impl !RefUnwindSafe for DockerComposer
impl Send for DockerComposer
impl Sync for DockerComposer
impl Unpin for DockerComposer
impl !UnwindSafe for DockerComposer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more