Build Pipeline
ACT features a smart build pipeline that can automatically detect and build your application from source, even without a Dockerfile.
Build Logic
When you deploy a service, ACT follows this logic to determine how to build your image:
- Manual Override: If you provided specific
dockerfile_contentvia API, use it. - User Dockerfile: Check if a
Dockerfileexists in the repo root (orcontext_path). - Nixpacks Auto-Detection: If no Dockerfile is found, ACT uses Nixpacks to analyze your code and generate a build plan.
[Start Deployment]
│
▼
Has 'dockerfile' content in API? ─── Yes ──► [Build Custom Dockerfile]
│
No
│
▼
Has Dockerfile in Repo? ──────────── Yes ──► [Build User Dockerfile]
│
No
│
▼
[Run Nixpacks Analysis] ────────────► [Generate Plan] ──► [Build Image]
Nixpacks Auto-Detection
ACT uses Nixpacks (v1.29.1) to automatically build the following project types:
- Node.js: Detects
package.json - Python: Detects
requirements.txt,poetry.lock, orPipfile - Go: Detects
go.mod - Rust: Detects
Cargo.toml - Java/Kotlin/Scala: Detects
pom.xmlorbuild.gradle - PHP: Detects
composer.json - Static Sites: HTML/CSS/JS
Customizing Auto-Builds
You can customize the Nixpacks build by setting environment variables in your Service configuration:
NIXPACKS_BUILD_CMD: Override the build command (e.g.,npm run build:prod)NIXPACKS_START_CMD: Override the start command (e.g.,node dist/main.js)NIXPACKS_PKGS: Install additional system packages (e.g.,ffmpeg,imagemagick)
Docker-in-Docker (DinD) Support
ACT’s builder is optimized to run on remote servers. It handles the complexities of “Docker-in-Docker” builds automatically:
- Local Cache: Uses
/var/lib/act/build-cacheon the server to speed up repeated builds. - Registry Cache: Pushes build cache layers to your container registry for multi-server performance.
- Multi-Arch: Supports building
amd64andarm64images using QEMU emulation if needed.