Skip to content
/ dtail Public

Like tail but for docker container logs with ability to read multiple containers log with one command

Notifications You must be signed in to change notification settings

root-ali/dtail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtail

A small CLI tool to tail logs from Docker containers by name or prefix.

This repository contains a lightweight command-line utility written in Go that watches and colorizes logs from Docker containers. It expects a DockerService type to provide container discovery and log streaming. A simple stub implementation can be used for development.

Features

  • Tail the last N lines from one or more containers.
  • Colorized per-container output for easy visual separation.
  • Graceful shutdown on Ctrl+C / SIGTERM.

Requirements

  • Go 1.20+ (or compatible)
  • Docker daemon if you use a real Docker integration

Quick build

go build -o dtail

Quick run

# run with go
go run ./main.go example-container

# run built binary with 50 lines of tail
./dtail -n 50 example-container another-prefix

Flags

  • -n, --tail — Number of lines to show from the end of the logs per container (default: 10)

How it matches containers

  • You may pass one or more container names or prefixes as CLI arguments.
  • The program looks up running containers and matches either exact names or prefixes.

License

  • MIT

About

Like tail but for docker container logs with ability to read multiple containers log with one command

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages