feat: Docker Host env, closes #30
oxker will check for an optional cli_arg `--host`, then the $DOCKER_HOST env, and if found use for connection. Fix unresponsiveness in debug mode when error set
This commit is contained in:
@@ -3,7 +3,7 @@ use std::process;
|
||||
use clap::Parser;
|
||||
use tracing::error;
|
||||
|
||||
#[derive(Parser, Debug, Clone, Copy)]
|
||||
#[derive(Parser, Debug, Clone)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
#[command(version, about)]
|
||||
pub struct CliArgs {
|
||||
@@ -19,6 +19,10 @@ pub struct CliArgs {
|
||||
#[clap(short = 'c', conflicts_with = "raw")]
|
||||
pub color: bool,
|
||||
|
||||
/// Docker host, defaults to `/var/run/docker.sock`
|
||||
#[clap(long, short = None)]
|
||||
pub host: Option<String>,
|
||||
|
||||
/// Show raw logs, default is to remove ansi formatting, conflicts with "-c"
|
||||
#[clap(short = 'r', conflicts_with = "color")]
|
||||
pub raw: bool,
|
||||
@@ -46,6 +50,7 @@ impl CliArgs {
|
||||
Self {
|
||||
color: args.color,
|
||||
docker_interval: args.docker_interval,
|
||||
host: args.host,
|
||||
gui: !args.gui,
|
||||
show_self: !args.show_self,
|
||||
raw: args.raw,
|
||||
|
||||
Reference in New Issue
Block a user