pub async fn launch(
        &mut self,
        name: &str,
        container: bollard::container::Config<String>,
        start_options: Option<StartContainerOptions<String>>,
    ) -> Result<(), Error> {
        self.containers.lock().await.push(name.to_string());

        match self
            .docker
            .lock()
            .await
            .create_container(Some(CreateContainerOptions { name }), container)
            .await
        {
            Ok(s) => s,
            Err(_) => {
                return Err(Error::Docker(DockerError::CreateContainer(
                    name.to_string(),
                )))
            }
        };

        match self
            .docker
            .lock()
            .await
            .start_container(name.clone(), start_options)
            .await
        {
            Ok(_) => {}
            Err(_) => return Err(Error::Docker(DockerError::StartContainer(name.to_string()))),
        };

        Ok(())
    }
/// launch is the meat of EggShell and is how most of the work gets done. When provided with a
/// name and container options, it will create and start that container, adding it to a
/// registry of containers it is tracking. When drop() happens on the EggShell this container
/// will be removed.
launch is the meat of EggShell and is how most of the work gets done. When provided with a
name and container options, it will create and start that container, adding it to a
registry of containers it is tracking. When drop() happens on the EggShell this container
will be removed.
launch is the meat of EggShell and is how most of the work gets done . When provided with a name and container options it will create and start that container adding it to a registry of containers it is tracking . When drop () happens on the EggShell this container will be removed .
pub async fn launch(
        &mut self,
        name: &str,
        container: bollard::container::Config<String>,
        start_options: Option<StartContainerOptions<String>>,
    ) -> Result<(), Error> {
        self.containers.lock().await.push(name.to_string());
        match self
            .docker
            .lock()
            .await
            .create_container(Some(CreateContainerOptions { name }), container)
            .await
        {
            Ok(s) => s,
            Err(_) => {
                return Err(Error::Docker(DockerError::CreateContainer(
                    name.to_string(),
                )))
            }
        };
        match self
            .docker
            .lock()
            .await
            .start_container(name.clone(), start_options)
            .await
        {
            Ok(_) => {}
            Err(_) => return Err(Error::Docker(DockerError::StartContainer(name.to_string()))),
        };
        Ok(())
    }
pub async fn launch ( & mut self , name : & str , container : bollard :: container :: Config < String > , start_options : Option < StartContainerOptions < String > > , ) -> Result < ( ) , Error > { self . containers . lock ( ) . await . push ( name . to_string ( ) ) ; match self . docker . lock ( ) . await . create_container ( Some ( CreateContainerOptions { name } ) , container ) . await { Ok ( s ) => s , Err ( _ ) => { return Err ( Error :: Docker ( DockerError :: CreateContainer ( name . to_string ( ) , ) ) ) } } ; match self . docker . lock ( ) . await . start_container ( name . clone ( ) , start_options ) . await { Ok ( _ ) => { } Err ( _ ) => return Err ( Error :: Docker ( DockerError :: StartContainer ( name . to_string ( ) ) ) ) , } ; Ok ( ( ) ) }
launch is the meat of EggShell and is how most of the work gets done.
launch is the meat of EggShell and is how most of the work gets done .
&mut self
name
&str
container
bollard::container::Config<String>
start_options
Option<StartContainerOptions<String>>
&mut self
name
&str
container
bollard::container::Config<String>
start_options
Option<StartContainerOptions<String>>