Class: Container

Container(image)

A single OCI container in a Job.

Constructor

new Container(image)

Constructs a new Container.
Parameters:
Name Type Description
image The OCI reference to the container image
Source:

Members

arguments

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.
Source:
Example
job.primaryContainer.command = ["helm", "install"]
job.primaryContainer.arguments = ["stable/nginx", "-g"]

command

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.
Source:
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.
Source:
Example
job.primaryContainer.env.AUTH_TOKEN = e.project.secrets.authToken  // e is event that triggered the handler

imagePullPolicy

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.
Source:

privileged

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.
Source:

sourceMountPath

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.
Source:

workingDirectory

The working directory for the process running in the container.
Source:

workspaceMountPath

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.
Source: