# Nixpacks — Build Docker Images from App Source with Zero Config > Nixpacks takes application source code and produces an OCI container image automatically by detecting the language, installing dependencies, and configuring the build — no Dockerfile required. ## Install Save as a script file and run: # Nixpacks — Build Docker Images from App Source with Zero Config ## Quick Use ```bash # Install curl -sSL https://nixpacks.com/install.sh | bash # Build an image from your app source nixpacks build ./my-app --name my-app # Run the built image docker run -p 3000:3000 my-app ``` ## Introduction Nixpacks turns application source code into OCI container images without requiring a Dockerfile. It inspects your project, detects the language and framework, resolves dependencies with Nix, and builds a production-ready image. It was created by Railway for their deployment platform and is open-sourced for general use. ## What Nixpacks Does - Auto-detects language and framework from project files - Installs system dependencies using Nix for reproducibility - Generates optimized multi-phase Docker builds - Supports Node.js, Python, Go, Rust, Java, Ruby, PHP, and more - Produces lean production images without build-time bloat ## Architecture Overview Nixpacks runs in three phases: detect, plan, and build. The detect phase identifies the language from files like package.json or requirements.txt. The plan phase generates a build plan specifying Nix packages, install commands, and build commands. The build phase executes the plan inside a Docker build, producing a final image. Nix is used for system-level dependencies, ensuring builds are reproducible across machines. ## Self-Hosting & Configuration - Install the CLI binary on macOS or Linux - Point it at any application directory to build an image - Override auto-detected settings with a nixpacks.toml file - Set custom build and start commands via CLI flags - Integrates with any container registry for image pushing ## Key Features - True zero-config for most standard project structures - Nix-based dependency resolution for reproducible builds - Support for 15+ languages and frameworks out of the box - Customizable build plans when defaults need adjustment - Significantly faster than generic Dockerfile approaches for many projects ## Comparison with Similar Tools - **Dockerfile** — manual, full control; Nixpacks automates the common case - **Buildpacks (Paketo/Heroku)** — similar auto-detect concept; Nixpacks uses Nix for deps and is often faster - **Docker Init** — generates a Dockerfile; Nixpacks skips the Dockerfile entirely - **ko** — Go-specific image builder; Nixpacks is polyglot ## FAQ **Q: What languages does Nixpacks support?** A: Node.js, Python, Go, Rust, Ruby, PHP, Java, .NET, Elixir, Haskell, Zig, and several others. **Q: Can I use it in CI/CD?** A: Yes. The CLI runs in any CI environment with Docker available. **Q: How does it compare to a hand-written Dockerfile?** A: For standard apps, Nixpacks produces comparable images with less effort. Complex multi-service builds may still need a custom Dockerfile. **Q: Does it require Nix to be installed?** A: No. Nix runs inside the Docker build. Only Docker is required on the host. ## Sources - https://github.com/railwayapp/nixpacks - https://nixpacks.com --- Source: https://tokrepo.com/en/workflows/asset-144dfd67 Author: Script Depot