A Docker project template generator that helps create consistent and well-structured Docker projects.
- Generate Docker projects from templates
- Consistent project structure with best practices
- Makefile-driven workflow
- OCI-compliant labels
- Templates using Tera (Jinja2-like syntax)
- Shell completion support (bash, zsh)
curl -fsSL -o essex-install.sh https://github.com/utensils/essex/releases/latest/download/download_cli.sh && bash essex-install.sh
This script will:
- Detect your OS and architecture
- Download the appropriate binary
- Install it to
~/.local/bin
- Provide instructions for adding to your PATH
The installer supports:
- macOS (Apple Silicon and Intel)
- Linux (x86_64 and ARM64)
Note: You may need to add ~/.local/bin
to your PATH if you haven't already:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc # or restart your terminal
cargo install --path .
Essex supports command-line completion for bash and zsh shells. You can enable it by following these steps:
- Generate and install the completion script:
# For current user
mkdir -p ~/.local/share/bash-completion/completions
essex completion bash > ~/.local/share/bash-completion/completions/essex.bash
# Or for system-wide installation (requires sudo)
sudo essex completion bash > /usr/share/bash-completion/completions/essex
- Add to your
~/.bashrc
:
source ~/.local/share/bash-completion/completions/essex.bash
- Reload your shell or source the file:
source ~/.bashrc
- Create the completion directory and generate the script:
mkdir -p ~/.zfunc
essex completion zsh > ~/.zfunc/_essex
- Add to your
~/.zshrc
:
fpath=(~/.zfunc $fpath)
autoload -Uz compinit
compinit
- Reload your shell or source the file:
source ~/.zshrc
After installation, you can test the completion by typing:
essex <TAB> # Shows available commands (list, new, completion, help)
essex new <TAB> # Shows available templates
essex completion <TAB> # Shows supported shells (bash, zsh)
# List available templates
essex list
# Create a new project
essex new basic namespace/project-name --username your-username --vendor "Your Company"
# Generate shell completion
essex completion bash # For bash
essex completion zsh # For zsh
The basic template includes:
- Dockerfile with best practices
- Makefile for common Docker operations
- README.md
- Entrypoint script
- OCI-compliant labels
project-name/
├── Dockerfile
├── Makefile
├── README.md
└── runtime-assets/
└── usr/
└── local/
└── bin/
└── entrypoint.sh
- Rust 1.70 or later
- Cargo
cargo build --release
cargo test # Run Rust tests
./test_install.sh # Run installer tests
The project follows semantic versioning and maintains synchronization between Cargo.toml versions and git tags.
To create a new release:
- Use the version bump script:
./scripts/bump_version.sh 1.0.0 # Replace with your version
- Review the changes:
git show HEAD
- Push the changes:
git push origin main v1.0.0 # Replace with your version
The CI/CD pipeline will:
- Verify that Cargo.toml version matches the git tag
- Run all tests
- Build binaries for all supported platforms
- Generate SHA256 checksums
- Create a GitHub release
- Upload all assets
- Follow Test-Driven Development (TDD) practices
- Write tests first before implementing new features
- Ensure each new feature or bug fix has corresponding tests
- Keep test coverage high and meaningful
- All code changes should maintain backward compatibility with existing templates
- Follow Rust best practices and idiomatic code patterns
- Ensure all templates follow Docker best practices:
- Use multi-stage builds where appropriate
- Include proper OCI labels
- Follow principle of least privilege (run as non-root user)
- Include proper documentation
- Always ensure Cargo version matches git tag for releases
MIT License