Skip to content

services.<name>.build

View as Markdown

How the service is built. Without this block Guv detects a Dockerfile or uses Railpack.

  • Type: object
  • Since: manifest v1
services:
web:
build:
builder: dockerfile
dockerfile: services/api/Dockerfile

services.<name>.build.builder

railpack auto-detects the stack, dockerfile builds a Dockerfile, image deploys a prebuilt image.

  • Type: railpack, dockerfile, image
  • Default: railpack
  • Since: manifest v1
services:
web:
build:
builder: dockerfile

services.<name>.build.dockerfile

Path to the Dockerfile, relative to the repository root.

  • Type: string
  • Since: manifest v1
services:
web:
build:
dockerfile: services/api/Dockerfile

services.<name>.build.context

Build context directory, relative to the repository root. Defaults to root.

  • Type: string
  • Since: manifest v1
services:
web:
build:
context: services/api

services.<name>.build.image

Image to deploy when builder is image (Docker Hub, GHCR or a private registry).

  • Type: string
  • Since: manifest v1
services:
web:
build:
image: ghcr.io/acme/api:1.4.2

services.<name>.build.registry_credentials

Secret holding credentials for a private registry.

  • Type: string
  • Pattern: ^secret://[A-Za-z_][A-Za-z0-9_-]{0,127}$
  • Since: manifest v1
services:
web:
build:
registry_credentials: secret://ghcr-token