Skip to content

Commit

Permalink
Removing force option for stop container
Browse files Browse the repository at this point in the history
  • Loading branch information
samuchila committed Feb 27, 2024
1 parent 630a727 commit aa6914b
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions api/src/infrastructure/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use async_stream::stream;
use async_trait::async_trait;
use bollard::auth::DockerCredentials;
use bollard::container::{
CreateContainerOptions, ListContainersOptions, LogOutput, RemoveContainerOptions,
StartContainerOptions, UploadToContainerOptions,
CreateContainerOptions, ListContainersOptions, LogOutput, StartContainerOptions,
UploadToContainerOptions,
};
use bollard::errors::Error as BollardError;
use bollard::image::CreateImageOptions;
Expand Down Expand Up @@ -348,15 +348,7 @@ impl DockerInfrastructure {
trace!("Stopped container {id} for {app_name}");
}

docker
.remove_container(
id,
Some(RemoveContainerOptions {
force: true,
..Default::default()
}),
)
.await?;
docker.remove_container(id, None).await?;
trace!("Deleted container {id} for {app_name}");

Ok::<ContainerInspectResponse, BollardError>(details)
Expand Down

0 comments on commit aa6914b

Please sign in to comment.