急忙的反义词是什么| 苏麻为什么不嫁给康熙| 苦丁茶有什么作用和功效| 扁平足是什么意思| 什么是冰丝面料| 唐僧被封为什么佛| 为什么胸闷一吃丹参滴丸就好| 老是发烧是什么原因| 皮肤糖化是什么意思| 淋巴吃什么药好| 各位同仁用在什么场合| 胡麻是什么植物| 肾积水是什么意思| nlp是什么意思| 舌苔开裂是什么原因呢| 任正非用的什么手机| 卵巢囊性占位是什么意思| 烤箱可以烤些什么东西| 补肾吃什么药效果最好| 金风送爽是什么意思| sid是什么| 合约机什么意思| 930是什么意思| 支气管挂什么科| 玻尿酸是什么| 沾沾喜气什么意思| 房颤什么意思| 牛跟什么生肖相冲| 规培生是什么意思| 五根手指叫什么| 头上长虱子什么原因引起的| 大战三百回合是什么意思| 害怕的反义词是什么| 女人脚腿肿是什么原因| 扫把和什么是一套的| 磷是什么元素| 医士是什么职称| 一个口一个有念什么| 什么是天乙贵人| 2021是什么年| 肾积水吃什么药最好| 什么是食品安全| 夜幕降临是什么意思| 肺炎有什么症状| 金木水火土各代表什么| 二十四节气分别是什么| 老烂腿用什么药最好| 眼睛肿了是什么原因| 千娇百媚是什么意思| 鸟大了什么林子都有| 为什么锻炼后体重反而增加了| 精液的主要成分是什么| 视黄醇是什么| 别字是什么意思| 刷酸是什么意思| 印度属于什么人种| 亚历山大王什么档次| 突然尿多是什么原因| 2是什么意思| 痹是什么意思| 了口是什么字| 什么人生病不看医生| kappa是什么牌子| 合成碳硅石是什么| 十一月二十六是什么星座| 习是什么结构的字| 锦纶是什么材料| 公务员是什么职业| 包饺子什么馅好吃| 梦见自己刷牙是什么意思| ph是什么意思| 做完人流需要注意什么| 什么水果泡酒最好| 左侧头皮发麻是什么原因| 天生丽质什么意思| tb是什么| 不什么为什么| 胸口容易出汗是什么原因| 66年属什么| 脚有点浮肿是什么原因| 埋怨是什么意思| 肾衰竭五期是什么意思| FAN英语什么意思| 女人长期做俯卧撑有什么效果| 左眼角有痣代表什么| 两三分钟就射什么原因| 肋软骨炎吃什么药| 死而什么什么| 五味杂陈什么意思| 六味地黄丸什么人不能吃| 师长相当于地方什么级别| 女性私处为什么会变黑| 兔子五行属什么| 做扩胸运动有什么好处| 今年30岁属什么生肖| 耳根子软是什么意思| 垒是什么意思| 百香果不能和什么一起吃| 物色什么意思| 1987年属什么今年多大| 世界上最多笔画的字是什么字| 经常打呼噜是什么原因| 什么叫野鸡大学| 海蜇是什么动物| 孙俪什么学历| 3.15什么星座| 什么是矫正视力| jomalone是什么牌子| 侏儒症是缺乏什么元素| 转氨酶偏高吃什么药| 吃槟榔有什么好处| 男同是什么意思| 吃金针菇有什么好处| 夏天吹什么风| 人彘是什么意思| 郑州有什么好玩的景点| 腿总是抽筋是什么原因| 下午4点半是什么时辰| 钟是什么意思| 三季人是什么意思| 吃什么能减脂肪肝| 汗毛长是什么原因| 肝回声稍密是什么意思| 嗓子痒咳嗽是什么原因| 什么是躯体化症状表现| 贲临是什么意思| 唐僧的真名叫什么| 梦见兔子是什么预兆| 盔甲是什么意思| 梦见给别人理发是什么意思| 725是什么意思| 什么是智齿| 什么时候恢复的高考| 省委巡视组组长什么级别| 阿托品属于什么类药物| 求婚什么意思| 愚昧什么意思| 太平天国失败的根本原因是什么| 可遇不可求什么意思| 花千骨什么时候上映的| 药物流产后吃什么好| 山西有什么特产| 肠粘连吃什么药| 孕妇喝什么水比较好| svip是什么意思| 中暑了吃什么药| 什么满天下| 没有美瞳护理液用什么代替| 少年什么意思| 效劳是什么意思| 婚车头车一般用什么车| 双侧乳腺小叶增生是什么意思| 经常感冒发烧是什么原因| 吃生花生有什么好处| 发字五行属什么| 车厘子是什么季节的水果| 窘迫什么意思| 针灸的原理是什么| 7月6日什么星座| 檀郎是什么意思| 东北冻梨是什么梨| 女性肾虚吃什么补最好最快| 手足口病什么症状| 自言自语是什么原因导致| 一什么沙发| 向日葵什么时候种| sharp是什么牌子| 风土人情是什么意思| 振水音阳性提示什么| 暗的反义词是什么| 芈月传芈姝结局是什么| 什么是梦| 老抽是什么| 木槿花什么时候开花| 舔是什么意思| 什么是龙骨| 纳财是什么意思| 匪气是什么意思| 腔梗和脑梗有什么区别| 口舌是非是什么意思| ct是检查什么的| 胸闷什么原因| 骨关节炎是什么原因引起的| zgo手表是什么牌子| 12.31什么星座| 拉美人是什么人种| 呵呵的含义是什么意思| 真实是什么意思| 流鼻血是什么引起的| 生普洱和熟普洱有什么区别| 乳腺癌有什么症状| 属蛇男和什么属相最配| 学渣什么意思| o型血可以接受什么血型| 自渡是什么意思| 小孩脸上有白斑是什么原因| 人生价值是什么| 湿化瓶内放什么水| 爱生闷气的人容易得什么病| 舌苔白腻是什么原因| 胆囊炎有什么症状表现| 醋酸是什么| 授课是什么意思| 二手房是什么意思| 水逆退散是什么意思| 了不起是什么意思| 桂花是什么季节开的| 不自觉是什么意思| 什么是sm| 胸部dr是什么| 靶向药是什么| 什么情况下要打狂犬疫苗| 雪茄为什么不过肺| 天地不仁以万物为刍狗是什么意思| 屁很臭是什么原因| 爱彼手表什么档次| 洋酒兑什么饮料好喝| 明天我要离开是什么歌| 玉竹是什么| 空调的睡眠模式是什么意思| 30岁以上适合用什么牌子的护肤品| 小气道病变是什么意思| 孕妇喝纯牛奶对胎儿有什么好处| 淋巴细胞绝对值偏高是什么原因| 甲功三项能查出什么病| 蜂王浆是什么| 返现是什么意思| 涩是什么意思| 牛皮革是什么意思| 什么叫情商| 腰椎间盘突出不能吃什么食物| 原来是什么意思| 彩金是什么| 暮春是什么时候| 晚上喝酸奶有什么好处和坏处| 五月三十一号是什么星座| 六七是什么意思| 冬天送什么礼物| 子时是什么时间| 崖柏是什么| 凌晨一点多是什么时辰| 工作是什么意思| 胃经常胀气是什么原因| 药流后需要注意什么| 1992年五行属什么| 男人肾虚吃什么最补| 心脏早博吃什么药好| 天天喝绿茶有什么好处和坏处| soe咖啡是什么意思| 什么体质容易长结石| 女人肾虚吃什么好得快| 可字属于五行属什么| 吃什么可以| 刚怀孕吃什么最好最营养| 戴银镯子变黑是什么原因| 什么样的疤痕影响当兵| 早上起床想吐是什么原因| 胃火旺怎么调理吃什么药最好| 疝气是什么原因引起的| 总打哈欠是什么原因| 逾期不候什么意思| 嗣女是什么意思| 荨麻疹有什么忌口吗| 附件炎是什么症状| 百度

Try to extend agent mode in VS Code!

小孩支气管炎吃什么药

百度 大力实施“领头雁工程”,选优配强党支部班子特别是党组织书记,加强党组织书记的轮训和培训工作,将党组织书记培训纳入干部教育培训总体规划,加强后备队伍建设,坚持老、中、青相结合,着力打造一支政治意识强、综合素质高、工作作风好的社区党组织书记队伍。

The Container Tools extension includes several Visual Studio Code tasks to control the behavior of Docker build and run, and form the basis of container startup for debugging.

The tasks allow for a great deal of control and customization. The final configuration is a combination of general defaults, platform-specific defaults (such as Node.js, Python, or .NET), and user input. User input takes precedence when it conflicts with defaults.

All common features of Visual Studio Code tasks (for example, grouping tasks into compound tasks) are supported by Container Tools extension tasks. For more information on common task features and properties, see the Visual Studio Code custom task documentation.

Docker build task

The docker-build task builds images using the Docker command line (CLI). The task can be used by itself, or as part of a chain of tasks to run and/or debug an application within a container.

The most important configuration settings for the docker-build task are dockerBuild and platform:

  • The dockerBuild object specifies parameters for the Docker build command. Values specified by this object are applied directly to Docker build CLI invocation.
  • The platform property is a hint that changes how the docker-build task determines Docker build defaults.

See property reference for full list of all task properties.

Platform support

While the docker-build task in tasks.json can be used to build any image, the extension has explicit support (and simplified configuration) for Node.js, Python, and .NET Core.

Node.js (docker-build)

Minimal configuration using defaults

A Node.js-based image with no specific platform options can just set the platform property to node:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Build Node Image",
      "type": "docker-build",
      "platform": "node"
    }
  ]
}

Platform defaults

For Node.js-based images, the docker-build task infers the following options:

Property Inferred Value
dockerBuild.context The same directory in which the package.json resides.
dockerBuild.dockerfile The file Dockerfile in the same directory as the package.json resides.
dockerBuild.tag The application's name property in package.json (if defined), else the base name of the folder in which package.json resides.
dockerBuild.pull Defaults to true in order to pull new base images before building.

Python (docker-build)

Minimal configuration using defaults

A Python-based image with no specific platform options can just set the platform property to python:

{
  "tasks": [
    {
      "type": "docker-build",
      "label": "docker-build",
      "platform": "python"
    }
  ]
}

Platform defaults

For Python-based images, the docker-build task infers the following options:

Property Inferred Value
dockerBuild.context The default context is the workspace folder.
dockerBuild.dockerfile The default Dockerfile path will be in the root of the workspace folder.
dockerBuild.tag The base name of the root workspace folder.
dockerBuild.pull Defaults to true in order to pull new base images before building.

.NET (docker-build)

Minimal configuration using defaults

When you build a .NET-based image, you can omit the platform property and just set the netCore object (platform is implicitly set to netcore when netCore object is present). Note that appProject is a required property:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Build Node Image",
      "type": "docker-build",
      "netCore": {
        "appProject": "${workspaceFolder}/project.csproj"
      }
    }
  ]
}

Platform defaults

For .NET-based images, the docker-build task infers the following options:

Property Inferred Value
dockerBuild.context The root workspace folder.
dockerBuild.dockerfile The file Dockerfile in the root workspace folder.
dockerBuild.tag The base name of the root workspace folder.
dockerBuild.pull Defaults to true in order to pull new base images before building.

Build task reference

Here are all properties available for configuring docker-build task. All properties are optional unless indicated otherwise.

Property Description
dockerBuild Options for controlling the docker build command executed (see below).
Required unless platform is set.
platform Determines the platform: .NET (netcore) or Node.js (node) and default settings for docker build command.
node Determines options specific for Node.js projects (see below).
python There are no object properties for Python in the docker-build task.
netCore Determines options specific for .NET projects (see below).

dockerBuild object properties

Property Description docker build CLI Equivalent
context The path to the build context.
Required, unless inferred from the platform.
PATH
dockerfile The path to the Dockerfile.
Required, unless inferred from the platform.
-f or --file
tag The tag applied to the image.
Required, unless inferred from the platform.
-t or --tag
buildArgs Build arguments applied to the command line. This is a list of key-value pairs. --build-arg
labels Labels added to the image. This is a list of key-value pairs (a JSON object).
In addition to labels specified here, a label com.microsoft.created-by, set to visual-studio-code is added to the image. This behavior can be turned off by setting includeDefaults property of the labels object to false.
--label
target The target in the Dockerfile to build to. --target
pull Whether or not to pull new base images before building. --pull
customOptions Any extra parameters to add before the context argument. No attempt is made to resolve conflicts with other options or validate this option. (any)

node object properties (docker-build task)

Property Description Default
package The path to the package.json file associated with the Dockerfile and docker-build task. The file package.json in the root workspace folder.

netCore object properties (docker-build task)

Property Description
appProject The .NET project file (.csproj, .fsproj, etc.) associated with the Dockerfile and docker-build task.
Required always.

Docker run task

The docker-run task in tasks.json creates and starts a container using the Docker command line (CLI). The task can be used by itself, or as part of a chain of tasks to debug an application within a container.

The most important configuration settings for the docker-run task are dockerRun and platform:

  • The dockerRun object specifies parameters for the Docker run command. Values specified by this object are applied directly to Docker run CLI invocation.
  • The platform property is a hint that changes how the docker-run task determines Docker run defaults.

See property reference for full list of all task properties.

Docker run platform support

While the docker-run task can be used to run any Docker image, the extension has explicit support (and simplified configuration) for Node.js, Python, and .NET.

Node.js (docker-run)

Minimal configuration using defaults

A Node.js-based image with no specific platform options can just set the platform property to node.

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run Node Image",
      "node": "docker-run",
      "platform": "node"
    }
  ]
}

Platform defaults

For Node.js-based images, the docker-run task infers the following options:

Property Inferred Value
dockerRun.command Generated from the npm start script in the package.json (if it exists), else generated from the main property in the package.json.
dockerRun.containerName Derived from the application package name.
dockerRun.image The tag from a dependent docker-build task (if one exists) or derived from the application package name, itself derived from the name property within package.json or the base name of the folder in which it resides.

Python (docker-run)

When building a Python-based image, you can omit the platform property and just set the python object (platform is implicitly set to python when python object is present)

Minimal configuration for Django Apps

{
  "type": "docker-run",
  "label": "docker-run: debug",
  "dependsOn": ["docker-build"],
  "python": {
    "args": ["runserver", "0.0.0.0:8000", "--nothreading", "--noreload"],
    "file": "path_to/manage.py"
  }
}

Minimal configuration for Flask Apps

{
  "type": "docker-run",
  "label": "docker-run: debug",
  "dependsOn": ["docker-build"],
  "dockerRun": {
    "env": {
      "FLASK_APP": "path_to/flask_entry_point.py"
    }
  },
  "python": {
    "args": ["run", "--no-debugger", "--no-reload", "--host", "0.0.0.0", "--port", "5000"],
    "module": "flask"
  }
}

Minimal configuration for General Apps

{
  "type": "docker-run",
  "label": "docker-run: debug",
  "dependsOn": ["docker-build"],
  "python": {
    "file": "path_to/app_entry_point.py"
  }
}

Platform defaults

For Python-based images, the docker-run task infers the following options:

Property Inferred Value
dockerRun.command Generated by the Python object and is called by the Python Debugger.
dockerRun.containerName Derived from the base name of the root workspace folder.
dockerRun.image The tag from a dependent docker-build task (if one exists) or derived from the base name of the root workspace folder.

.NET (docker-run)

Minimal configuration using defaults

When building a .NET-based image, you can omit the platform property and just set the netCore object (platform is implicitly set to netcore when netCore object is present). Note that appProject is a required property:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run .NET Core Image",
      "type": "docker-run",
      "netCore": {
        "appProject": "${workspaceFolder}/project.csproj"
      }
    }
  ]
}

Platform defaults

For .NET-based images, the docker-run task infers the following options:

Property Inferred Value
dockerRun.containerName Derived from the base name of the root workspace folder.
dockerRun.env Adds the following environment variables as required: ASPNETCORE_ENVIRONMENT, ASPNETCORE_URLS, and DOTNET_USE_POLLING_FILE_WATCHER.
dockerRun.image The tag from a dependent docker-build task (if one exists) or derived from the base name of the root workspace folder.
dockerRun.os Linux
dockerRun.volumes Adds the following volumes as required: the local application folder, the source folder, the debugger folder, the NuGet package folder, and NuGet fallback folder.

Run task reference

Here are all properties available for configuring docker-run task. All properties are optional unless indicated otherwise.

Property Description
dockerRun Options for controlling the docker run command executed (see below).
Required unless platform is set.
platform Determines the platform: .NET (netcore) or Node.js (node) and default settings for docker run command.
node For Node.js projects, this controls various options (see below).
python For Python projects, this controls various options (see below).
netCore For .NET projects, this controls various options (see below).

dockerRun object properties

Property Description CLI Equivalent
image The name (tag) of the image to run.
Required unless inferred from the platform.
IMAGE
command The command to run upon starting the container.
Required, unless inferred from the platform.
COMMAND [ARG...]
containerName The name given to the started container.
Required, unless inferred from the platform.
--name
env Environment variables set in the container. This is a list of key-value pairs. -e or --env
envFiles This is a list of .env files. --env-file
labels Labels given to the started container. This is a list of key-value pairs. --label
network The name of the network to which the container will be connected. --network
networkAlias The network-scoped alias for the started container. --network-alias
os Default is Linux, the other option is Windows. The container operating system used. N/A
ports The ports to publish (map) from container to host. This is a list of objects (see below). -p or --publish
portsPublishAll Whether to publish all ports exposed by the Docker image. Defaults to true if no ports are explicitly published. -P
extraHosts The hosts to add to the container for DNS resolution. This is a list of objects (see below). --add-host
volumes The volumes to map into the started container. This is a list of objects (see below). -v or --volume
remove Whether or not to remove the container after it stops. --rm
customOptions Any extra parameters to add before the image argument. No attempt is made to resolve conflicts with other options or validate this option. (any)

ports object properties

Property Description Default
containerPort The port number bound on the container.
Required.
hostPort The port number bound on the host. (randomly selected by Docker)
protocol The protocol for the binding (tcp or udp). tcp

extraHosts object properties

Property Description
hostname The hostname for DNS resolution.
Required.
ip The IP address associated with the above hostname.
Required.

volumes object properties

Property Description Default
localPath The path on the local machine that will be mapped.
Required.
containerPath The path in the container to which the local path will be mapped.
Required.
permissions Permissions the container has on the mapped path. Can be ro (read-only) or rw (read-write). Container dependent.

node object properties (docker-run task)

Property Description Default
package The path to the package.json file associated with the docker-run task. The file package.json in the root workspace folder.
enableDebugging Whether or not to enable debugging within the container. false
inspectMode Defines the initial interaction between the application and the debugger (default or break).
The value default allows the application to run until the debugger attaches.
The value break prevents the application from running until the debugger attaches.
default
inspectPort The port on which debugging should occur. 9229

python object properties (docker-run task)

Property Description Default
args Arguments passed to the Python app. Platform dependent. Defaults of scaffolding shown above
debugPort The port that the debugger will listen on. 5678
wait Whether to wait for debugger to attach. true
module The Python module to run (only module or file should be chosen).
file The Python file to run (only module or file should be chosen).

netCore object properties (docker-run task)

Property Description
appProject The .NET project file (.csproj, .fsproj, etc.) associated with docker-run task.
Required.
configureSsl Whether to configure ASP.NET Core SSL certificates and other settings to enable SSL on the service in the container.
enableDebugging Whether to enable the started container for debugging. This will infer additional volume mappings and other options necessary for debugging.

Docker Compose task

The docker-compose task in tasks.json creates and starts containers using the Docker Compose command line (CLI). The task can be used by itself, or as part of a chain of tasks to debug an application within a container.

The most important configuration setting for the docker-compose task is dockerCompose:

  • The dockerCompose object specifies parameters for the Docker Compose command. Values specified by this object are applied directly to Docker Compose CLI invocation.

See property reference for full list of all task properties.

Example configuration

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run docker-compose up",
      "type": "docker-compose",
      "dockerCompose": {
        "up": {
          "detached": true,
          "build": true,
          "services": ["myservice"]
        },
        "files": [
          "${workspaceFolder}/docker-compose.yml",
          "${workspaceFolder}/docker-compose.debug.yml"
        ]
      }
    }
  ]
}

Compose task reference

Here are all properties available for configuring docker-compose task. All properties are optional unless indicated otherwise.

Property Description
dockerCompose Options for controlling the docker-compose command executed (see below).
Required.

dockerCompose object properties

Property Description CLI Equivalent
up Run a docker-compose up command.
Either this or down must be specified, but not both.
docker-compose up
down Run a docker-compose down command.
Either this or up must be specified, but not both.
docker-compose down
files The list of Docker Compose YAML files to use in the docker-compose command. If not specified, the Docker Compose CLI looks for docker-compose.yml and docker-compose.override.yml. -f <file>
envFile File of environment variables read in and applied to the containers. --env-file <file>
projectName Alternate project name to use when naming and labeling Docker objects. If using an alternate project name when composing up, the same project name must be specified when composing down. --project-name <name>

up object properties

Property Description CLI Equivalent Default
detached Whether or not to run detached. -d true
build Whether or not to build before running. --build true
scale Number of instances of each service to run. This is a list of key-value pairs. --scale SERVICE=NUM
services A subset of the services to start. Cannot be combined with profiles. [SERVICE...] (all)
profiles A subset of the profiles to start. Cannot be combined with services. --profile <profile> (all)
customOptions Any extra parameters to add after the up argument. No attempt is made to resolve conflicts with other options or validate this option. (any)

down object properties

Property Description CLI Equivalent Default
removeImages Whether to remove images, and which. all will remove all images used by any service, local will remove only images without a custom tag. Leaving this unset will remove no images. --rmi
removeVolumes Whether or not to remove named volumes. -v false
customOptions Any extra parameters to add after the down argument. No attempt is made to resolve conflicts with other options or validate this option. (any)

Command customization

The Container Tools extension executes a number of Docker CLI commands when you perform various operations, such as to build images, run containers, attach to containers, and view container logs. Some of these commands have a large number of optional arguments, often used in very specific scenarios. As an alternative to the above Visual Studio Code tasks, several commands can be customized when tasks are not in use.

For example, the tokens ${serviceList} and ${profileList} in the Compose Up command allows for easily starting a subset of the services within your Docker Compose YAML file(s).

For each of these customizable Docker commands, a configuration setting is available to set the template of what to execute. Alternatively, you can define multiple templates, optionally with a regular expression, which when matched, hints the context in which a template should be used. The templates support some tokens similar to launch.json and tasks.json, for example, ${workspaceFolder}.

Settings JSON schema

You have two options for configuring each of the templates (listed below). The first option is a single template that overrides the default behavior:

{
  "containers.commands.build": "docker build --rm -f \"${dockerfile}\" -t ${tag} \"${context}\""
}

The second option is multiple templates that will be chosen based on the match regular expression, as well as user input.

For example, three templates are shown in the following example:

{
  "containers.commands.build": [
    {
      "label": "Default build command",
      "template": "docker build --rm -f \"${dockerfile}\" -t ${tag} \"${context}\""
    },
    {
      "label": "Alpine-specific build command",
      "template": "docker build -p 1234:1234 -f \"${dockerfile}\" -t ${tag} \"${context}\"",
      "match": "alpine"
    }
  ]
}

Selection behavior

The command template chosen to execute is selected based on the following rules:

  1. If no setting is configured, the default command template is chosen.
  2. If only a single template is configured (the first example above), that template is chosen.
  3. If multiple templates are configured:
    1. Constrained templates are checked. A constrained template has match. The match regular expression is compared against contextual hints--for example, image name, container name, etc.
    2. If multiple constrained templates apply, the user will be prompted to choose. If only one applies, the user will not be prompted.
    3. If there no applicable constrained templates, unconstrained templates are checked. An unconstrained template does not have match, and is therefore always applicable.
    4. If multiple unconstrained templates apply, the user will be prompted to choose. If only one applies, the user will not be prompted.

Docker Build

Configuration Setting Default Value
docker.commands.build ${containerCommand} build --rm -f "${dockerfile}" -t ${tag} "${context}"

Supported tokens:

Token Description
${containerCommand} The CLI command / executable used to execute container commands.
${dockerfile} The workspace-relative path of the selected Dockerfile.
${tag} The value entered/confirmed by the user upon invoking the build command. If previously built, defaults to the previously entered value for that Dockerfile.
${context} If set, the value of the containers.imageBuildContextPath configuration setting. Otherwise, the workspace-relative folder in which the Dockerfile resides.

Note: If the containers.commands.build setting does not contain the ${tag} token, the user will not be prompted to enter/confirm a tag.

Note: The match regular expression will be compared against the selected Dockerfile name and the workspace folder name.

Docker Run

Configuration Setting Default Value
containers.commands.run ${containerCommand} run --rm -d ${exposedPorts} ${tag}
containers.commands.runInteractive ${containerCommand} run --rm -it ${exposedPorts} ${tag}

Supported tokens:

Token Description
${containerCommand} The CLI command / executable used to execute container commands.
${exposedPorts} Generated from the list of exposed ports in the image (ultimately from the Dockerfile), where each exposed port is mapped to the same port on the local machine. For example, "EXPOSE 5000 5001" would generate "-p 5000:5000 -p 5001:5001".
${tag} The full tag of the selected image.

Note: The match regular expression will be compared against the full tag of the selected image.

Container Attach

Configuration Setting Default Value
containers.commands.attach ${containerCommand} exec -it ${containerId} ${shellCommand}

Supported tokens:

Token Description
${containerCommand} The CLI command / executable used to execute container commands.
${containerId} The ID of the container to attach to.
${shellCommand} If bash is present in the container, it is substituted here, otherwise sh. In Windows containers, cmd is always used.

Note: The match regular expression will be compared against the container name and full tag of the container image.

Container Logs

Configuration Setting Default Value
containers.commands.logs ${containerCommand} logs -f ${containerId}

Supported tokens:

Token Description
${containerCommand} The CLI command / executable used to execute container commands.
${containerId} The ID of the container to view the logs for.

Note: The match regular expression will be compared against the container name and full tag of the container image.

Docker Compose Up

Configuration Setting Default Value
containers.commands.composeUp ${composeCommand} ${configurationFile} up ${detached} ${build}

Supported tokens:

Token Description
${configurationFile} Set to -f plus the workspace-relative path to the selected Docker Compose YAML file.
${detached} Set to -d if the configuration setting containers.composeDetached is set to true. Otherwise, set to "".
${build} Set to --build if the configuration setting containers.composeBuild is set to true. Otherwise, set to "".
${serviceList} If specified, prompts for a subset of the services to start when the command is run.
${profileList} If specified and the Docker Compose YAML file contains profiles, prompts for a subset of the profiles to start when the command is run.
${composeCommand} Set to the value of the containers.composeCommand setting if set, otherwise the extension will try to automatically determine the command to use (docker compose or docker-compose).

Docker Compose Down

Configuration Setting Default Value
containers.commands.composeDown ${composeCommand} ${configurationFile} down

Supported tokens:

Token Description
${configurationFile} Set to -f plus the workspace-relative path to the selected Docker Compose YAML file.
${composeCommand} Set to the value of the containers.composeCommand setting if set, otherwise the extension will try to automatically determine the command to use (docker compose or docker-compose).

Additional supported tokens

In addition to the command-specific supported tokens, the following tokens are supported in all command templates:

Token Description
${workspaceFolder} The selected workspace folder path.
${config:some.setting.identifier} The value of any configuration setting, as long as it is a string, number, or boolean. These setting identifiers can be arbitrarily defined and do not need to belong to Visual Studio Code or to any extension.
${env:Name} The value of an environment variable.
${command:commandID} The string return value of a command.
christmas是什么意思 拿铁和美式有什么区别 儿化音是什么意思 两手发麻是什么原因 门对门风水有什么说法
孩子老是流鼻血是什么原因 喝白茶有什么好处 流产后吃什么水果最佳 新生儿老打嗝什么原因 皮炎是什么原因引起的
内裤用什么洗比较好 健身hit什么意思 测血型挂什么科 动车与高铁有什么区别 5月12日是什么星座
纺锤形是什么形状 什么水果含维c最多 滨海新区有什么好玩的地方 十羊九不全是什么意思 一什么港湾
乌鸡不能和什么一起吃hcv7jop4ns5r.cn 过敏性咳嗽用什么药效果好hcv8jop0ns3r.cn 梦见煮饺子是什么意思hcv8jop7ns3r.cn npc是什么意思hcv9jop1ns3r.cn 为什么人不会飞hcv7jop5ns6r.cn
肴肉是什么肉beikeqingting.com collection什么牌子hcv9jop0ns8r.cn 厘清是什么意思hcv9jop2ns7r.cn 蓝瘦香菇是什么意思hcv9jop4ns1r.cn 外科和内科有什么区别jiuxinfghf.com
开方是什么意思hcv9jop3ns0r.cn 朱祁镇为什么杀于谦weuuu.com 吃什么东西能养胃tiangongnft.com 弥是什么意思hcv9jop5ns5r.cn 也字少一竖念什么hcv7jop9ns0r.cn
子鼠是什么意思hcv8jop6ns0r.cn 上学是为了什么hcv8jop9ns0r.cn 9月27日是什么星座hcv8jop9ns0r.cn 月柱华盖是什么意思hcv9jop4ns1r.cn 柠檬和什么一起泡减肥hcv8jop9ns3r.cn
百度