pub struct DockerImageManager { /* private fields */ }Expand description
Manages Docker images for TSK
Implementations§
Source§impl DockerImageManager
impl DockerImageManager
Sourcepub fn new(
docker_client: Arc<dyn DockerClient>,
template_manager: DockerTemplateManager,
composer: DockerComposer,
) -> Self
pub fn new( docker_client: Arc<dyn DockerClient>, template_manager: DockerTemplateManager, composer: DockerComposer, ) -> Self
Creates a new DockerImageManager
Sourcepub fn get_image(
&self,
tech_stack: &str,
agent: &str,
project: Option<&str>,
project_root: Option<&Path>,
) -> Result<DockerImage>
pub fn get_image( &self, tech_stack: &str, agent: &str, project: Option<&str>, project_root: Option<&Path>, ) -> Result<DockerImage>
Get the appropriate Docker image for the given configuration
This method implements intelligent fallback:
- If the project-specific layer doesn’t exist and project != “default”, it will try again with project=“default”
- Returns error if tech_stack or agent layers are missing
Sourcepub async fn ensure_image(
&self,
tech_stack: &str,
agent: &str,
project: Option<&str>,
build_root: Option<&Path>,
force_rebuild: bool,
) -> Result<DockerImage>
pub async fn ensure_image( &self, tech_stack: &str, agent: &str, project: Option<&str>, build_root: Option<&Path>, force_rebuild: bool, ) -> Result<DockerImage>
Ensure a Docker image exists, rebuilding if necessary
This method:
- Checks if the image exists in the Docker daemon
- If missing or force_rebuild is true, builds the image
- Returns the DockerImage information
Sourcepub async fn build_image(
&self,
tech_stack: &str,
agent: &str,
project: Option<&str>,
build_root: Option<&Path>,
no_cache: bool,
) -> Result<DockerImage>
pub async fn build_image( &self, tech_stack: &str, agent: &str, project: Option<&str>, build_root: Option<&Path>, no_cache: bool, ) -> Result<DockerImage>
Build a Docker image for the given configuration
Sourcepub async fn build_proxy_image(&self, no_cache: bool) -> Result<DockerImage>
pub async fn build_proxy_image(&self, no_cache: bool) -> Result<DockerImage>
Build the proxy image
Auto Trait Implementations§
impl Freeze for DockerImageManager
impl !RefUnwindSafe for DockerImageManager
impl Send for DockerImageManager
impl Sync for DockerImageManager
impl Unpin for DockerImageManager
impl !UnwindSafe for DockerImageManager
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