Skip to main content

Docker Deploys

Bring your own Dockerfile or deploy a prebuilt image. RailPush gives you full Docker flexibility.

Custom Dockerfile

If your repo has a Dockerfile, RailPush uses it automatically. You can customize the path:

railpush.yaml
services:
- type: web
name: my-app
runtime: docker
dockerfilePath: ./docker/Dockerfile.prod
buildContext: . # alias for dockerContext — both work
dockerCommand: node server.js

Build Context

The buildContext (or dockerContext) field sets the working directory for builds. For Docker builds, it's the Docker build context. For Nixpacks/Buildpack builds, it determines the root of the application. Both field names are accepted interchangeably.

Prebuilt Image

Skip the build entirely and deploy from a Docker registry:

railpush.yaml
services:
- type: web
name: my-app
image:
url: ghcr.io/myorg/myapp:v1.2.3
port: 8080