Skip to main content

Container Call [object]

An object defining a container call.

Properties

image

An image [object] defining the container image run by the call.

cmd

An array initializer or variable-reference [string] defining the path (from workDir) of the binary to call and it's arguments.

defining cmd overrides any entrypoint and/or cmd defined by the image

dirs

An object for which each key is an absolute path in the container and each value is one of:

valuemeaning
nullMount dir embedded in op w/ same path (equivalent to $(./relative/path))
dir variable-reference [string]Mount dir
dir initializerEvaluate and mount

envVars

An object initializer or variable-reference [string], whos properties represent the name and value of an environment variable to be set in the container.

upon evaluation, the key and value of each property will be coerced to a string.

files

An object for which each key is an absolute path in the container and each value is one of:

valuemeaning
nullMount file embedded in op w/ same path (equivalent to $(./relative/path))
file variable-reference [string]Mount file
file initializerEvaluate and mount

name

A string initializer defining a name by which the container can be reached by other opctl containers and opctl host nodes.

if multiple containers are given the same name, network requests will be distributed (load balanced) across them.

sockets

An object for which each key is an absolute path in the container and and each value is a socket variable-reference [string] to mount.

workDir

A string initializer defining absolute path from which cmd will be executed.

defining workDir overrides any defined by the image