Documentation
Deploy with Docker
Deploy any app with your own Dockerfile, or run a prebuilt image from a registry, on Rebasable.
If your repository has a Dockerfile at the root (or the path you set in Dockerfile path), Rebasable builds it with BuildKit and a layer cache. Everything your Dockerfile can do, we can run.
Requirements
- The container must listen on
0.0.0.0and thePORTenv var (default10000). You can also set the port in Settings → Port. CMDorENTRYPOINTstarts your app; the Start command setting overrides it.
Example
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
ENV PORT=10000
EXPOSE 10000
CMD ["node", "server.js"]
Build context and multiple Dockerfiles
Set Docker context (for example .) and Dockerfile path (for example docker/api.Dockerfile) per service. Multi-stage builds are supported and recommended.
Build arguments and secrets
Environment variables are available to the build as build secrets. To read one in a RUN step:
RUN --mount=type=secret,id=NPM_TOKEN \
NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) npm ci
Avoid ARG for secrets: build args end up in the image metadata.
Prebuilt images
Choose Existing image when you create a service and enter an image URL like ghcr.io/acme/api:1.4.2. Private registries take a username and token. Deploying a new tag is a deploy with a new image URL (rebasable deploy --image ghcr.io/acme/api:1.4.3).
Sandboxing
Every container runs under the gVisor sandbox with dropped Linux capabilities. Images that need privileged mode, host networking or kernel modules are not supported.