This Go utility removes Docker containers with autogenerated names (for example, inspiring_franklin or practical_hawking).
- Loads adjective/surname lists from Docker's names generator and detects names matching
<adjective>_<surname>with an optional numeric suffix. - Uses the official Docker Go SDK to list all containers and remove the autogenerated ones.
go build
./dcnb
TUI controls:
yorEnter: delete all auto-named containersnorq/Ctrl+C: cancel and exit
Cross-compile example:
GOOS=linux GOARCH=arm64 go build
- Format and test:
gofmt -w *.goandgo test - Names list: based on names-generator.go from Docker's source code.