Theia API Documentation v1.65.0
    Preparing search index...
    interface DevContainerCommon {
        additionalProperties?: { [k: string]: unknown };
        customizations?: {
            vscode?: {
                extensions?: string[];
                settings?: { [k: string]: unknown };
                [k: string]: unknown;
            };
            [k: string]: unknown;
        };
        extensions?: string[];
        features?: { [k: string]: unknown };
        forwardPorts?: (string | number)[];
        hostRequirements?: {
            cpus?: number;
            gpu?: boolean | "optional" | { cores?: number; memory?: string };
            memory?: string;
            storage?: string;
            [k: string]: unknown;
        };
        initializeCommand?: string
        | string[];
        name?: string;
        onCreateCommand?: string | string[] | { [k: string]: string | string[] };
        otherPortsAttributes?: {
            elevateIfNeeded?: boolean;
            label?: string;
            onAutoForward?:
                | "notify"
                | "openBrowser"
                | "openPreview"
                | "silent"
                | "ignore";
            protocol?: "http"
            | "https";
            requireLocalPort?: boolean;
        };
        overrideFeatureInstallOrder?: string[];
        portsAttributes?: {
            [k: string]: {
                elevateIfNeeded?: boolean;
                label?: string;
                onAutoForward?: | "notify"
                | "openBrowser"
                | "openBrowserOnce"
                | "openPreview"
                | "silent"
                | "ignore";
                protocol?: "http"
                | "https";
                requireLocalPort?: boolean;
                [k: string]: unknown;
            };
        };
        postAttachCommand?: string
        | string[]
        | { [k: string]: string | string[] };
        postCreateCommand?: string | string[] | { [k: string]: string | string[] };
        postStartCommand?: string | string[] | { [k: string]: string | string[] };
        remoteEnv?: { [k: string]: null | string };
        remoteUser?: string;
        settings?: { [k: string]: unknown };
        updateContentCommand?:
            | string
            | string[]
            | { [k: string]: string
            | string[] };
        updateRemoteUserUID?: boolean;
        userEnvProbe?:
            | "none"
            | "loginShell"
            | "loginInteractiveShell"
            | "interactiveShell";
        waitFor?: | "initializeCommand"
        | "onCreateCommand"
        | "updateContentCommand"
        | "postCreateCommand"
        | "postStartCommand";
        [k: string]: unknown;
    }

    Indexable

    • [k: string]: unknown
    Index

    Properties

    additionalProperties?: { [k: string]: unknown }
    customizations?: {
        vscode?: {
            extensions?: string[];
            settings?: { [k: string]: unknown };
            [k: string]: unknown;
        };
        [k: string]: unknown;
    }

    Tool-specific configuration. Each tool should use a JSON object subproperty with a unique name to group its customizations.

    extensions?: string[]

    extensions to install in the container at launch. The expeceted format is publisher.name[@version]. The default is no extensions being installed.

    features?: { [k: string]: unknown }

    Features to add to the dev container.

    forwardPorts?: (string | number)[]

    Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format 'host:port_number'.

    hostRequirements?: {
        cpus?: number;
        gpu?: boolean | "optional" | { cores?: number; memory?: string };
        memory?: string;
        storage?: string;
        [k: string]: unknown;
    }

    Host hardware requirements.

    Type Declaration

    • [k: string]: unknown
    • Optionalcpus?: number

      Number of required CPUs.

    • Optionalgpu?: boolean | "optional" | { cores?: number; memory?: string }
    • Optionalmemory?: string

      Amount of required RAM in bytes. Supports units tb, gb, mb and kb.

    • Optionalstorage?: string

      Amount of required disk space in bytes. Supports units tb, gb, mb and kb.

    initializeCommand?: string | string[]

    A command to run locally before anything else. This command is run before 'onCreateCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    name?: string

    A name for the dev container which can be displayed to the user.

    onCreateCommand?: string | string[] | { [k: string]: string | string[] }

    A command to run when creating the container. This command is run after 'initializeCommand' and before 'updateContentCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    otherPortsAttributes?: {
        elevateIfNeeded?: boolean;
        label?: string;
        onAutoForward?:
            | "notify"
            | "openBrowser"
            | "openPreview"
            | "silent"
            | "ignore";
        protocol?: "http"
        | "https";
        requireLocalPort?: boolean;
    }

    Type Declaration

    • OptionalelevateIfNeeded?: boolean

      Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.

    • Optionallabel?: string

      Label that will be shown in the UI for this port.

    • OptionalonAutoForward?: "notify" | "openBrowser" | "openPreview" | "silent" | "ignore"

      Defines the action that occurs when the port is discovered for automatic forwarding

    • Optionalprotocol?: "http" | "https"

      The protocol to use when forwarding this port.

    • OptionalrequireLocalPort?: boolean
    overrideFeatureInstallOrder?: string[]

    Array consisting of the Feature id (without the semantic version) of Features in the order the user wants them to be installed.

    portsAttributes?: {
        [k: string]: {
            elevateIfNeeded?: boolean;
            label?: string;
            onAutoForward?:
                | "notify"
                | "openBrowser"
                | "openBrowserOnce"
                | "openPreview"
                | "silent"
                | "ignore";
            protocol?: "http"
            | "https";
            requireLocalPort?: boolean;
            [k: string]: unknown;
        };
    }

    Type Declaration

    • [k: string]: {
          elevateIfNeeded?: boolean;
          label?: string;
          onAutoForward?:
              | "notify"
              | "openBrowser"
              | "openBrowserOnce"
              | "openPreview"
              | "silent"
              | "ignore";
          protocol?: "http"
          | "https";
          requireLocalPort?: boolean;
          [k: string]: unknown;
      }

      A port, range of ports (ex. '40000-55000'), or regular expression (ex. '.+/server.js'). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.

      This interface was referenced by undefined's JSON-Schema definition via the patternProperty '(^\d+(-\d+)?$)|(.+)'.

      Type Declaration

      • [k: string]: unknown
      • OptionalelevateIfNeeded?: boolean

        Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.

      • Optionallabel?: string

        Label that will be shown in the UI for this port.

      • OptionalonAutoForward?:
            | "notify"
            | "openBrowser"
            | "openBrowserOnce"
            | "openPreview"
            | "silent"
            | "ignore"

        Defines the action that occurs when the port is discovered for automatic forwarding

      • Optionalprotocol?: "http" | "https"

        The protocol to use when forwarding this port.

      • OptionalrequireLocalPort?: boolean
    postAttachCommand?: string | string[] | { [k: string]: string | string[] }

    A command to run when attaching to the container. This command is run after 'postStartCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    postCreateCommand?: string | string[] | { [k: string]: string | string[] }

    A command to run after creating the container. This command is run after 'updateContentCommand' and before 'postStartCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    postStartCommand?: string | string[] | { [k: string]: string | string[] }

    A command to run after starting the container. This command is run after 'postCreateCommand' and before 'postAttachCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    remoteEnv?: { [k: string]: null | string }

    Remote environment variables to set for processes spawned in the container including lifecycle scripts and any remote editor/IDE server process.

    remoteUser?: string

    The username to use for spawning processes in the container including lifecycle scripts and any remote editor/IDE server process. The default is the same user as the container.

    settings?: { [k: string]: unknown }

    settings to set in the container at launch in the settings.json. The expected format is key=value. The default is no preferences being set.

    updateContentCommand?: string | string[] | { [k: string]: string | string[] }

    A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after 'onCreateCommand' and before 'postCreateCommand'. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.

    updateRemoteUserUID?: boolean

    Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default when opening from a local folder.

    userEnvProbe?:
        | "none"
        | "loginShell"
        | "loginInteractiveShell"
        | "interactiveShell"

    User environment probe to run. The default is 'loginInteractiveShell'.

    waitFor?:
        | "initializeCommand"
        | "onCreateCommand"
        | "updateContentCommand"
        | "postCreateCommand"
        | "postStartCommand"

    The user command to wait for before continuing execution in the background while the UI is starting up. The default is 'updateContentCommand'.