Nife Build Options | Dockerfile, Buildpacks & Docker Images
Build and Deployment Options are essential to deploy an Application A builders help creating a deployable image.
There are three primary builder mechanisms available on Nife:
1. Auto-Detect Cloud Native Buildpacks (CNB)​
When you connect a Git repository without a Dockerfile, Nife's build runner scans your codebase and automatically selects the optimal Cloud Native Buildpack stack (Paketo and Heroku-compatible builders):
- Node.js: Detects
package.jsonoryarn.lock/pnpm-lock.yaml, runs automated package installation, builds static assets, and configures the default start command (npm start). - Python: Detects
requirements.txt,Pipfile, orpyproject.toml, installs dependencies into a secure virtual environment, and configures Gunicorn / Uvicorn. - Go: Detects
go.mod, compiles a statically linked binary, and runs inside a minimal distroless runtime container. - Java / JVM: Detects
pom.xml(Maven) orbuild.gradle(Gradle), runs build goals, and configures optimized JVM heap flags.
2. Dockerfile & Multi-Stage Builds​
If a Dockerfile is present in your repository or root archive, Nife prioritizes it automatically. Multi-stage builds are fully supported, ensuring build-time dependencies (compilers, SDKs) are excluded from the final production container image to minimize security attack surface and reduce image pull latency.
3. Pre-Built Container Image​
If your continuous integration pipeline already builds container images (via GitHub Actions, GitLab CI, or Jenkins), you can bypass build steps entirely by specifying a public or private Docker image URI from Docker Hub, GHCR, AWS ECR, GCP Artifact Registry, or Azure ACR.