services

Additional Docker containers to run alongside the job (e.g. a database).

Supported: string, name, alias, entrypoint, command, variables, pull_policy

Not supported: docker options, kubernetes options

Examples

Service as string

job:
  script: echo "job"
  services:
    - postgres:16-alpine

Service with name

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine

Service with alias

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine
      alias: db

Service with entrypoint

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine
      entrypoint: ["docker-entrypoint.sh"]

Service with command

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine
      command:
        - postgres
        - -c
        - max_connections=200

Service with variables

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine
      variables:
        POSTGRES_DB: mydb
        POSTGRES_PASSWORD: secret

Pull policy

job:
  script: echo "job"
  services:
    - name: postgres:16-alpine
      pull_policy: if-not-present