Skip to content
rise.toml Schema

Building Container Images

Rise supports multiple build backends for creating container images from your application code. Building happens automatically as part of rise deploy, or you can build standalone with rise build.

BackendToolDetails
docker, docker:build, docker:buildx, docker:buildctl / buildctldocker / buildctlDocker
packpack CLIPack
railpack, railpack:buildx, railpack:buildctlrailpack + buildx/buildctlRailpack
Featuredocker:builddocker:buildxbuildctlpackrailpack:buildxrailpack:buildctl
Requires BuildKitxxxx
SSL cert injectionxxxxx
Proxy supportxxxxxx
Native --push*PartialxPartialx
Local outputDirect--loaddocker load pipeDirect--loaddocker load pipe
Managed BuildKitxxN/Axx
Build contextsxx

Use --separate-push to force the fallback mechanism even when native push is available. This builds/loads the image locally first and pushes it in a separate step, which is useful for long CI builds where short-lived registry credentials should be refreshed immediately before pushing.

When --backend is not specified, Rise detects the build method automatically:

  • If Dockerfile or Containerfile exists → docker:buildx (or docker:build if buildx is unavailable)
  • Otherwise → railpack:buildx

Override with --backend or in rise.toml:

Terminal window
rise deploy --backend railpack
[build]
backend = "pack"

Pass build arguments with -b / --build-arg:

Terminal window
rise build myapp:latest -b NODE_ENV=production -b BUILD_VERSION=1.2.3

Or in rise.toml:

[build]
args = ["NODE_ENV=production", "BUILD_VERSION"]

Using KEY without =VALUE reads the variable from your shell environment (useful for CI metadata like git SHAs).

How backends use these variables:

  • Docker: Passed as --build-arg (requires ARG declaration in Dockerfile)
  • Pack: Passed as --env to pack CLI
  • Railpack: Passed as BuildKit secrets

Build args are for build configuration only (compiler flags, tool versions). For runtime variables, use -e / --env on rise deploy, or rise env set. See Environment Variables for the distinction.

Force a complete rebuild:

Terminal window
rise deploy --no-cache

Or in rise.toml:

[build]
no_cache = true

Rise normally picks the right build platform for you:

  • rise deploy: the backend tells the CLI what architecture its cluster expects (read from the controller’s node_selector["kubernetes.io/arch"]). A production backend pinning amd64 will produce amd64 images even when you deploy from an ARM Mac.
  • rise build / rise run / no backend hint: the CLI builds for your host architecture (so an ARM Mac builds linux/arm64, an Intel machine builds linux/amd64).

You only need to specify a platform explicitly to override the inference — for example, building an amd64 image on an ARM Mac for sharing with a colleague:

Terminal window
rise build myapp:latest --platform linux/amd64

Or in rise.toml:

[build]
platform = "linux/amd64"

Or via environment variable:

Terminal window
RISE_PLATFORM=linux/amd64 rise build myapp:latest

Precedence (highest to lowest): --platform flag → RISE_PLATFORM env var → rise.toml → backend-advertised target → host architecture.

When the platform is inferred rather than explicitly set, the CLI prints a one-line notice so the choice isn’t silent.

If you’re behind a corporate proxy or have custom CA certificates, see SSL & Proxy Configuration for managed BuildKit daemon setup, certificate injection, and proxy variable handling.