dockerize wraps container entrypoints to render config templates from environment variables, tail log files to stdout, and block startup until dependent TCP, HTTP, or unix sockets are ready.
Overview
dockerize is a small Go utility for Docker and Compose workflows. You wrap your application's ENTRYPOINT or CMD so dockerize runs first, then execs the main process once setup is done.
Template mode uses Go text/template to generate configuration files at container start from environment variables, with helpers for defaults, splits, JSON queries, and loops. Templates can target files or directories and optionally refuse to overwrite existing outputs.
Log tailing can forward selected files to stdout or stderr, with optional polling when inotify is unavailable. Wait mode blocks until listed dependencies respond on file, tcp, http, https, or unix URLs, with configurable timeout and retry intervals.
Published images include a distroless base with dockerize on PATH, plus platform-specific download binaries. Documentation lists valid wait URL forms and flag combinations that must be used together.
Key features
- Env-driven config templates at startup
- Tail files to stdout or stderr
- Wait for TCP, HTTP, file, or unix
- Go template helpers and delimiters
- Distroless base image variant
- Strict flag dependency checks
Use cases
- Generating app config inside containers
- Delaying start until databases listen
- Forwarding legacy file logs to Docker logs