Skip to content

Environment variables

Specifying environment variables for containers

When creating a new job or scheduled job, clients must provide specifications for the containers they want to run. It is possible, but not mandatory, to provide extra environment variables in each container specification. The defined environment variables are then available during the container runtime as environment variables of string data type.

Example request that specifies environment variables for a container

{
    "runtime": {
        "type": "ContainerRuntimeSpec",
        "containers": [
            {
                "Image": "busybox",
                "Command": ["/bin/sh", "-c", "ls"],
                "EnvironmentVariables": 
                    {
                        "foo": "bar",
                        "spam", "42"
                    }
            }
        ]
    }
}