mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
chore: adds error for agent
This commit is contained in:
3
main.go
3
main.go
@@ -40,6 +40,9 @@ func main() {
|
|||||||
if subcommand != nil {
|
if subcommand != nil {
|
||||||
switch subcommand.(type) {
|
switch subcommand.(type) {
|
||||||
case *cli.AgentCmd:
|
case *cli.AgentCmd:
|
||||||
|
if args.Mode != "server" {
|
||||||
|
log.Fatal().Msg("Dozzle agent command is only available in server mode")
|
||||||
|
}
|
||||||
client, err := docker.NewLocalClient(args.Hostname)
|
client, err := docker.NewLocalClient(args.Hostname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Could not create docker client")
|
log.Fatal().Err(err).Msg("Could not create docker client")
|
||||||
|
|||||||
Reference in New Issue
Block a user