Railpack
The Railpack backend builds container images using Railway Railpacks with BuildKit — no Dockerfile needed. Railpack auto-detects your application type and generates an optimized build plan.
See Building Images for the backend comparison and general options (build args, platform, cache).
Prerequisites
Section titled “Prerequisites”Install the railpack CLI:
mise use -g ubi:railwayapp/railpackBasic Usage
Section titled “Basic Usage”rise build myapp:latest --backend railpackrise deploy --backend railpack:buildctlRailpack is the default backend when no Dockerfile or Containerfile is present.
Backend Variants
Section titled “Backend Variants”railpack/railpack:buildx— usesrailpack preparethendocker buildx buildrailpack:buildctl— usesrailpack preparethenbuildctl build(no Docker daemon needed)
How It Works
Section titled “How It Works”Railpack builds are two steps:
- Prepare:
railpack preparegenerates a build plan (JSON) from your application code. Environment variables and secrets are declared at this stage. - Build: The plan is built using either
docker buildx build(with therailpack-frontendBuildKit frontend) orbuildctl build. Environment variables are passed as BuildKit secrets, not build args.