Options
All
  • Public
  • Public/Protected
  • All
Menu

A single OCI container in a Job.

Hierarchy

  • Container

Index

Constructors

  • Constructs a new Container.

    Parameters

    • image: string

      The OCI reference to the container image

    Returns Container

Properties

arguments: string[] = []

The arguments to pass to Container#command. If the command includes arguments already, the arguments property are appended. A common convention is to use the command array for subcommands and the arguments array for argument values.

example

job.primaryContainer.command = ["helm", "install"] job.primaryContainer.arguments = ["stable/nginx", "-g"]

command: string[] = []

The command to run in the container. If not specified, the default entry point of the container is called.

Only the first element of the array is the actual command. Subsequent elements are treated as arguments. For example, a command of ["echo", "hello"] is equivalent to running 'echo hello'. A common convention is to use the command array for subcommands and the arguments array for argument values.

example

job.primaryContainer.command = ["helm", "install"] job.primaryContainer.arguments = ["stable/nginx", "-g"]

environment: {} = {}

Environment variables to set in the container. These are often derived from project settings such as secrets.

You can safely pass secrets via environment variables, because Brigade treats all environment variables as secrets.

example

job.primaryContainer.env.AUTH_TOKEN = e.project.secrets.authToken // e is event that triggered the handler

Type declaration

  • [key: string]: string
image: string

The OCI image that the container should run.

imagePullPolicy: ImagePullPolicy = ImagePullPolicy.IfNotPresent

Specifies under what conditions the host node should re-fetch an image that is already in its local cache. The permitted values are as IfNotPresent (the default) and Always.

privileged: boolean = false

Whether the container should run with privileged permissions. This is typically required only for "Docker in Docker" scenarios where the container must run its own Docker daemon.

Privileged execution may be disallowed by Brigade project configuration. If so, the container will run unprivileged.

sourceMountPath: string = ""

The path in the container's file system where, if applicable, source code retrieved from a version control system repository should be mounted. If empty (the default), Brigade will not mount any source code automatically.

Source code mounting must be enabled at the project configuration level for containers to access it. If it is not enabled, you should leave this property empty.

workingDirectory: string = ""

The working directory for the process running in the container.

workspaceMountPath: string = ""

The path in the container's file system where, if applicable, the Brigade worker's shared workspace should be mounted. If empty (the default), the Job does not have access to the shared workspace.

The shared workspace must be enabled at the project configuration level for containers to access it. If it is not enabled, you should leave this property empty.

Generated using TypeDoc