dibo
dibo (dockerignore boilerplates) is a simple CLI tool written in Go for generating .dockerignore files from reusable templates.
It is inspired by gibo, but focused specifically on Docker.
With dibo, you can quickly create a .dockerignore tailored to your project by combining multiple templates.
Features
π Fast and simple β Just one command to generate .dockerignore
π¦ Built-in templates β Common languages and frameworks included
π§ Flexible β Combine multiple templates as needed (duplicate patterns are removed automatically)
π Secrets template β Keep credentials, keys, and .env files out of your image
π Case-insensitive β dibo init go and dibo init Go both work
π‘οΈ Safe by default β Won't overwrite an existing .dockerignore unless you ask
β¨οΈ Shell completion β bash / zsh / fish / powershell
π‘ fzf integration β Interactive template selection (recommended)
Installation
Using Go
go install github.com/anton-fuji/dibo@latest
Using Homebrew
brew tap anton-fuji/tap
brew install dibo
Using Nix (Flakes)
You can run dibo directly or install it using Nix Flakes.
Run without installing
nix run github:anton-fuji/dibo -- list
Install to your profile
nix profile install github:anton-fuji/dibo
Use in a temporary shell
nix shell github:anton-fuji/dibo
usage
Template names are case-insensitive β go, Go, and GO all resolve to the same template.
Generate .dockerignore
Generate .dockerignore for your project. Multiple templates are merged and duplicate patterns are removed automatically.
# Single template
dibo init Go
# Multiple templates
dibo init Go Node
# Keep secrets out of your image
dibo init Go Secrets
By default init will not overwrite an existing .dockerignore. Use a flag to change that:
| Flag |
Description |
-f, --force |
Overwrite the file if it already exists |
-a, --append |
Append to the file instead of overwriting |
-o, --output <path> |
Write to a different path (default: .dockerignore) |
dibo init Go --force
dibo init Node --append
dibo init Go -o build/.dockerignore
List Templates
Show a list of available templates.
dibo list
Search Templates
Filter templates by keyword (case-insensitive substring match).
dibo search ru # -> Ruby, Rust
Dump a template
Output the contents of a specified template to stdout.
dibo dump <template> [<template>...]
Shell completion
dibo ships with completion for bash, zsh, fish, and powershell. Template names are completed automatically.
# zsh (current shell)
source <(dibo completion zsh)
# bash (persist)
dibo completion bash > /etc/bash_completion.d/dibo
Run dibo completion --help for instructions for your shell.
typical usage
If you want to generate .dockerignore for Go:
dibo init Go
Recommend : Use with fzf
For an interactive experience, combine dibo with fzf.
dibo list | fzf
# Interactive single selection
dibo dump $(dibo list | fzf) >> .dockerignore
LICENSE
MIT