services.<name>.build
How the service is built. Without this block Guv detects a Dockerfile or uses Railpack.
- Type: object
- Since: manifest v1
Example
Section titled “Example”services: web: build: builder: dockerfile dockerfile: services/api/DockerfileFields
Section titled “Fields”builder
Section titled “builder”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: dockerfiledockerfile
Section titled “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/Dockerfilecontext
Section titled “context”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/apiservices.<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.2registry_credentials
Section titled “registry_credentials”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-tokenSee also
Section titled “See also”- services: all fields of
services - guv.yaml reference