Interface NonComposeContainerBase

interface NonComposeContainerBase {
    appPort?: string | number | (string | number)[];
    containerEnv?: {
        [k: string]: string;
    };
    containerUser?: string;
    mounts?: (string | MountConfig)[];
    overrideCommand?: boolean;
    runArgs?: string[];
    shutdownAction?: "none" | "stopContainer";
    workspaceFolder?: string;
    workspaceMount?: string;
    [k: string]: unknown;
}

Indexable

[k: string]: unknown

Properties

appPort?: string | number | (string | number)[]

Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. '8000:8010'.

containerEnv?: {
    [k: string]: string;
}

Container environment variables.

Type declaration

  • [k: string]: string
containerUser?: string

The user the container will be started with. The default is the user on the Docker image.

mounts?: (string | MountConfig)[]

Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.

overrideCommand?: boolean

Whether to overwrite the command specified in the image. The default is true.

runArgs?: string[]

The arguments required when starting in the container.

shutdownAction?: "none" | "stopContainer"

Action to take when the user disconnects from the container in their editor. The default is to stop the container.

workspaceFolder?: string

The path of the workspace folder inside the container.

workspaceMount?: string

The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project.