A CLI tool for generating Docker-related configuration files.
cargo build --release
The binary will be available at target/release/dockerfile_generator
Generate individual configuration files using the following commands:
dockerfile_generator <file-type> [options]
Available file types:
dockerfile
devcontainer
compose
bake
Generate a complete development container setup:
dockerfile_generator all --folder <output-directory>
This creates all necessary files in the specified directory:
Dockerfile
devcontainer.json
docker-compose.yml
docker-bake.hcl
dockerfile_generator dockerfile \
--base-image rust:1.83-slim \
--maintainer "Generated <generated@example.com>" \
--packages "cargo,git" \
--workdir /app \
--entrypoint /bin/bash \
--output Dockerfile
dockerfile_generator all \
--folder ./devcontainer \
--base-image rust:1.83-slim \
--maintainer "Generated <generated@example.com>"
--folder
: Output directory for generated files--output
: Specify output filename (for single file generation)
--base-image
: Base Docker image--maintainer
: Maintainer information--packages
: Comma-separated list of packages to install--workdir
: Working directory in container--entrypoint
: Container entrypoint
--name
: Container name--features
: Additional features to include--extensions
: VS Code extensions to install
Contributions are welcome! Please feel free to submit a Pull Request.