Skip to main content

Docker Image

Scaffold a container-native Docker image without assuming Express, Discord, or another application workload.

Why Use This Command?

  1. Starts from a pinned Alpine runtime so the image foundation remains predictable.
  2. Runs as a non-root app user and leaves application installation and startup decisions to the project.
  3. Includes Compose and Nova-managed lifecycle scripts without inserting a web server or opening a port.
  4. Can add a release workflow for GitHub Container Registry or Docker Hub with an explicit architecture target.

Requirements

  • Node.js runtime — Use any Node.js LTS release.
  • Docker — Install Docker with Compose support before running the generated development, production, build, or deployment commands.
  • Empty directory or monorepo root — Nova auto-detects whether to create a project or add a workspace.

Usage

Options

FlagDescription
-d, --dry-runRun without writing any files.
--name <name>Project slug when creating a new monorepo; omit at an existing root.
--non-interactiveUse flags and defaults without opening prompts.
--workspace-name <name>Workspace directory name.
--output <dir>Output directory.
--publish <none|ghcr|docker-hub>Registry workflow; defaults to none.
--architectures <value>amd64, arm64, or amd64,arm64; used only when publishing and defaults to both.

Output Files

FileDescription
DockerfilePinned Alpine image with a non-root runtime user.
compose.ymlContainer-native Compose service without a port assumption.
.dockerignoreExclusions for source-control, environment, and build artifacts.
package.jsonNova lifecycle scripts for Docker development, build, and deploy.
tests/project.test.tsVitest workspace identity coverage for the generated project.

When publishing is enabled, Nova writes .github/workflows/{workspace-name}-container.yml at the monorepo root. GHCR uses the workflow's GITHUB_TOKEN. Docker Hub expects the DOCKERHUB_USERNAME repository variable and DOCKERHUB_TOKEN repository secret.

Non-Interactive Mode

bash
nova scaffold app docker-image --non-interactive --name my-service --workspace-name api --output ./my-service
nova scaffold app docker-image --non-interactive --workspace-name api --output ./apps/api
nova scaffold app docker-image --non-interactive --workspace-name gateway --output ./apps/gateway --publish ghcr --architectures amd64,arm64
nova scaffold app docker-image --non-interactive --workspace-name appliance --output ./apps/appliance --publish docker-hub --architectures arm64

Registration

Nova registers the workspace with the app role and trackable policy. Its package name follows {projectSlug}-app-{workspaceName}.

The generated image is deliberately a foundation. Add the packages, copied assets, ports, health checks, and final CMD required by the actual container workload. To package an Express or Discord workload instead, use its own scaffold with --docker-image.