feat: exec mode improvements

Use Bollard library to exec in pure Rust.

`--use-cli` cli arg, will then only try to exec into containers using
Docker.

Only try to exec into a container if the state == Running.
This commit is contained in:
Jack Wills
2023-11-17 02:49:30 +00:00
parent 28b0315dd7
commit 0e5ee143b0
15 changed files with 477 additions and 142 deletions
+8 -3
View File
@@ -1,9 +1,14 @@
use crate::app_data::ContainerId;
use std::sync::Arc;
#[derive(Debug, Clone)]
use crate::app_data::ContainerId;
use bollard::Docker;
use tokio::sync::oneshot::Sender;
#[derive(Debug)]
pub enum DockerMessage {
Delete(ContainerId),
ConfirmDelete(ContainerId),
Delete(ContainerId),
Exec(Sender<Arc<Docker>>),
Pause(ContainerId),
Quit,
Restart(ContainerId),