Plugin reference¶
This document lists all plugins in order of execution.
BasePlugin¶
Load or create a default configuration and set up logging.
Properties¶
workspace (
string
): Path defining the DI workspace (absolute or relative to the URI of this document). All subsequent path definitions must be absolute or relative to the workspace.docker (
string
): Name of the docker CLI (default:docker
).log-level (
string
): (default:info
).dry-run (
boolean
): Whether to just construct the docker command.status-code (
integer
): status code returned by docker.plugins: .
GoogleContainerRegistryPlugin¶
Configure docker authorization for Google services such as Google Container Registry.
WorkspaceMountPlugin¶
Mount the workspace inside the container.
Properties¶
- run: .
workspace-dir (
string
): Path at which to mount the workspace in the container (default:/workspace
).workdir (
string
): (default:#{workspace-dir}
).
UserPlugin¶
Share the host user id and group id with the container.
The plugin provides the following additional variables for substitution:
user/name
: Name of the user on the host.user/uid
: User id of the user on the host.group/name
: Name of the user group on the host.group/gid
: Group id of the user group on the host.
Properties¶
- run: .
user (
string
): Username or UID (format: <name|uid>[:<group|gid>]).
HomeDirPlugin¶
Mount a home directory placed in the current directory.
GoogleCloudCredentialsPlugin¶
Mount Google Cloud credentials in the Docker container.
BuildConfigurationPlugin¶
Configure how to build a docker image.
Properties¶
- build: .
path (
string
): Path of the build context (default:#{/workspace}
).tag (
string
): Name and optionally a tag in the ‘name:tag’ format (default:docker-interface-image
).file (
string
): Name of the Dockerfile (default:#{path}/Dockerfile
).build-arg (
object
): Set build-time variables.no-cache (
boolean
): Do not use cache when building the image.quiet (
boolean
): Suppress the build output and print image ID on success.cpu-shares (
integer
): CPU shares (relative weight).memory (
string
): Memory limit.
RunConfigurationPlugin¶
Configure how to run a command inside a docker container.
Properties¶
- run: .
image (
string
): Image to derive the container from (default:#{/build/tag}
).env (
object
): Set environment variables (use null to forward environment variables).env-file (
array
): Read in a file of environment variables.mount (
array
): Attach a filesystem mount to the container.publish (
array
): Publish a container’s port(s), or range(s) of ports, to the host.runtime (
string
): Runtime to use for this container.tmpfs (
array
): Mount a tmpfs directory.cmd (
array
): Command to execute inside the container.tty (
boolean
): Allocate a pseudo-TTY.cpu-shares (
integer
): CPU shares (relative weight).name (
string
): Assign a name to the container.network (
string
): Connect a container to a network (default “default”).label (
array
): Set meta data on a container.rm (
boolean
): Automatically remove the container when it exits (default:True
).privileged (
boolean
): Give extended privileges to this container.memory (
string
): Memory limit.interactive (
boolean
): Keep STDIN open even if not attached.entrypoint (
string
): Overwrite the default ENTRYPOINT of the image.workdir (
string
): Working directory inside the container.user (
string
): Username or UID (format: <name|uid>[:<group|gid>]).group-add (
array
): Additional groups to run as.gpus (
string
): GPU devices to add to the container (‘all’ to pass all GPUs).
JupyterPlugin¶
Forward the port required by Jupyter Notebook to the host machine and print a URL for easily accessing the notebook server.
SubstitutionPlugin¶
Substitute variables in strings.
String values in the configuration document may
reference other parts of the configuration document using
#{path}
, wherepath
may be an absolute or relative path in the document.reference a variable using
${path}
, wherepath
is assumed to be an absolute path in theVARIABLES
class attribute of the plugin.
By default, the plugin provides environment variables using the env
prefix. For example,
a value could reference the user name on the host using ${env/USER}
. Other plugins can
provide variables for substitution by extending the VARIABLES
class attribute and should
do so using a unique prefix.
ValidationPlugin¶
Validate the configuration document.
BuildPlugin¶
Build a docker image.
RunPlugin¶
Run a command inside a docker container.