Welcome to mirror list, hosted at ThFree Co, Russian Federation.

devContainer.schema.src.json « schemas « configuration-editing « extensions - github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db0c3822e7c30dbdba1962ec6faa5da1d2f20a8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"description": "Defines a dev container",
	"allowComments": true,
	"allowTrailingCommas": false,
	"definitions": {
		"devContainerCommon": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string",
					"description": "A name for the dev container displayed in the UI."
				},
				"extensions": {
					"type": "array",
					"description": "An array of extensions that should be installed into the container.",
					"items": {
						"type": "string",
						"pattern": "^([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*)((@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)|@prerelease)?$",
						"errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'."
					}
				},
				"settings": {
					"$ref": "vscode://schemas/settings/machine",
					"description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again."
				},
				"features": {
					"type": "object",
					"description": "Features to add to the dev container.",
					"additionalProperties": true
				},
				"forwardPorts": {
					"type": "array",
					"description": "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\".",
					"items": {
						"oneOf": [
							{
								"type": "integer",
								"maximum": 65535,
								"minimum": 0
							},
							{
								"type": "string",
								"pattern": "^([a-z0-9-]+):(\\d{1,5})$"
							}
						]
					}
				},
				"portsAttributes": {
					"type": "object",
					"patternProperties": {
						"(^\\d+(-\\d+)?$)|(.+)": {
							"type": "object",
							"description": "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.",
							"properties": {
								"onAutoForward": {
									"type": "string",
									"enum": [
										"notify",
										"openBrowser",
										"openBrowserOnce",
										"openPreview",
										"silent",
										"ignore"
									],
									"enumDescriptions": [
										"Shows a notification when a port is automatically forwarded.",
										"Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.",
										"Opens the browser when the port is automatically forwarded, but only the first time the port is forward during a session. Depending on your settings, this could open an embedded browser.",
										"Opens a preview in the same window when the port is automatically forwarded.",
										"Shows no notification and takes no action when this port is automatically forwarded.",
										"This port will not be automatically forwarded."
									],
									"description": "Defines the action that occurs when the port is discovered for automatic forwarding",
									"default": "notify"
								},
								"elevateIfNeeded": {
									"type": "boolean",
									"description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.",
									"default": false
								},
								"label": {
									"type": "string",
									"description": "Label that will be shown in the UI for this port.",
									"default": "Application"
								},
								"requireLocalPort": {
									"type": "boolean",
									"markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.",
									"default": false
								},
								"protocol": {
									"type": "string",
									"enum": [
										"http",
										"https"
									],
									"description": "The protocol to use when forwarding this port."
								}
							},
							"default": {
								"label": "Application",
								"onAutoForward": "notify"
							}
						}
					},
					"markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n  \"label\": \"Application\"\n},\n\"40000-55000\": {\n  \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```",
					"defaultSnippets": [
						{
							"body": {
								"${1:3000}": {
									"label": "${2:Application}",
									"onAutoForward": "notify"
								}
							}
						}
					],
					"additionalProperties": false
				},
				"otherPortsAttributes": {
					"type": "object",
					"properties": {
						"onAutoForward": {
							"type": "string",
							"enum": [
								"notify",
								"openBrowser",
								"openPreview",
								"silent",
								"ignore"
							],
							"enumDescriptions": [
								"Shows a notification when a port is automatically forwarded.",
								"Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.",
								"Opens a preview in the same window when the port is automatically forwarded.",
								"Shows no notification and takes no action when this port is automatically forwarded.",
								"This port will not be automatically forwarded."
							],
							"description": "Defines the action that occurs when the port is discovered for automatic forwarding",
							"default": "notify"
						},
						"elevateIfNeeded": {
							"type": "boolean",
							"description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.",
							"default": false
						},
						"label": {
							"type": "string",
							"description": "Label that will be shown in the UI for this port.",
							"default": "Application"
						},
						"requireLocalPort": {
							"type": "boolean",
							"markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.",
							"default": false
						},
						"protocol": {
							"type": "string",
							"enum": [
								"http",
								"https"
							],
							"description": "The protocol to use when forwarding this port."
						}
					},
					"defaultSnippets": [
						{
							"body": {
								"onAutoForward": "ignore"
							}
						}
					],
					"markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n  \"onAutoForward\": \"ignore\"\n}\n```",
					"additionalProperties": false
				},
				"updateRemoteUserUID": {
					"type": "boolean",
					"description": "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."
				},
				"remoteEnv": {
					"type": "object",
					"additionalProperties": {
						"type": [
							"string",
							"null"
						]
					},
					"description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled."
				},
				"remoteUser": {
					"type": "string",
					"description": "The user VS Code Server will be started with. The default is the same user as the container."
				},
				"initializeCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"onCreateCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"updateContentCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"postCreateCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"postStartCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"postAttachCommand": {
					"type": [
						"string",
						"array"
					],
					"description": "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.",
					"items": {
						"type": "string"
					}
				},
				"waitFor": {
					"type": "string",
					"enum": [
						"initializeCommand",
						"onCreateCommand",
						"updateContentCommand",
						"postCreateCommand",
						"postStartCommand"
					],
					"description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"."
				},
				"devPort": {
					"type": "integer",
					"description": "The port VS Code can use to connect to its backend."
				},
				"userEnvProbe": {
					"type": "string",
					"enum": [
						"none",
						"loginShell",
						"loginInteractiveShell",
						"interactiveShell"
					],
					"description": "User environment probe to run. The default is \"loginInteractiveShell\"."
				},
				"codespaces": {
					"type": "object",
					"additionalProperties": true,
					"description": "Codespaces-specific configuration."
				},
				"hostRequirements": {
					"type": "object",
					"description": "Host hardware requirements.",
					"allOf": [
						{
							"type": "object",
							"properties": {
								"cpus": {
									"type": "integer",
									"minimum": 1,
									"description": "Number of required CPUs."
								},
								"memory": {
									"type": "string",
									"pattern": "^\\d+([tgmk]b)?$",
									"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
								},
								"storage": {
									"type": "string",
									"pattern": "^\\d+([tgmk]b)?$",
									"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
								}
							}
						}
					]
				},
				"customizations": {
					"type": "object",
					"properties": {
						"vscode": {
							"type": "object",
							"properties": {
								"extensions": {
									"type": "array",
									"description": "An array of extensions that should be installed into the container.",
									"items": {
										"type": "string",
										"pattern": "^([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$",
										"errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'."
									}
								},
								"settings": {
									"$ref": "vscode://schemas/settings/machine",
									"description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again."
								},
								"devPort": {
									"type": "integer",
									"description": "The port VS Code can use to connect to its backend."
								}
							}
						},
						"codespaces": {
							"type": "object",
							"properties": {
								"repositories": {
									"type": "object",
									"description": "Configuration relative to a GitHub repository",
									"pattern": "^[a-zA-Z0-9-_.]+[.]*\/[a-zA-Z0-9-_*]+[.]*$",
									"errorMessage": "Expected format: 'owner/repo' (eg: 'microsoft/vscode'). A wildcard (*) is permitted for the repo name. (eg: 'microsoft/*').",
									"oneOf": [
										{
											"properties": {
												"permissions": {
													"type": "object",
													"description": "Addional repository permissions. See https://aka.ms/ghcs/multi-repo-auth for more info.",
													"anyOf": [
														{
															"actions": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"checks": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"contents": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"deployments": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"discussions": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"issues": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"packages": {
																"type": "string",
																"enum": [
																	"read"
																]
															},
															"pages": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"pull_requests": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"repository_projects": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"statuses": {
																"type": "string",
																"enum": [
																	"read",
																	"write"
																]
															},
															"workflows": {
																"type": "string",
																"enum": [
																	"write"
																]
															}
														}
													]
												}
											}
										},
										{
											"properties": {
												"permissions": {
													"type": "string",
													"enum": [
														"read-all",
														"write-all"
													]
												}
											}
										}
									]
								}
							}
						}
					},
					"additionalProperties": {
						"type": "object",
						"additionalProperties": true
					},
					"description": "Tool-specific configuration. Each tool should use a JSON object subproperty with a unique name to group its customizations."
				}
			}
		},
		"nonComposeBase": {
			"type": "object",
			"properties": {
				"appPort": {
					"type": [
						"integer",
						"string",
						"array"
					],
					"description": "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\".",
					"items": {
						"type": [
							"integer",
							"string"
						]
					}
				},
				"containerEnv": {
					"type": "object",
					"additionalProperties": {
						"type": "string"
					},
					"description": "Container environment variables."
				},
				"containerUser": {
					"type": "string",
					"description": "The user the container will be started with. The default is the user on the Docker image."
				},
				"mounts": {
					"type": "array",
					"description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.",
					"items": {
						"type": "string"
					}
				},
				"runArgs": {
					"type": "array",
					"description": "The arguments required when starting in the container.",
					"items": {
						"type": "string"
					}
				},
				"shutdownAction": {
					"type": "string",
					"enum": [
						"none",
						"stopContainer"
					],
					"description": "Action to take when the VS Code window is closed. The default is to stop the container."
				},
				"overrideCommand": {
					"type": "boolean",
					"description": "Whether to overwrite the command specified in the image. The default is true."
				},
				"workspaceFolder": {
					"type": "string",
					"description": "The path of the workspace folder inside the container."
				},
				"workspaceMount": {
					"type": "string",
					"description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project."
				}
			}
		},
		"dockerfileContainer": {
			"oneOf": [
				{
					"type": "object",
					"properties": {
						"build": {
							"type": "object",
							"description": "Docker build-related options.",
							"allOf": [
								{
									"type": "object",
									"properties": {
										"dockerfile": {
											"type": "string",
											"description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file."
										},
										"context": {
											"type": "string",
											"description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file."
										}
									},
									"required": [
										"dockerfile"
									]
								},
								{
									"$ref": "#/definitions/buildOptions"
								}
							]
						}
					},
					"required": [
						"build"
					]
				},
				{
					"allOf": [
						{
							"type": "object",
							"properties": {
								"dockerFile": {
									"type": "string",
									"description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file."
								},
								"context": {
									"type": "string",
									"description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file."
								}
							},
							"required": [
								"dockerFile"
							]
						},
						{
							"type": "object",
							"properties": {
								"build": {
									"description": "Docker build-related options.",
									"$ref": "#/definitions/buildOptions"
								}
							}
						}
					]
				}
			]
		},
		"buildOptions": {
			"type": "object",
			"properties": {
				"target": {
					"type": "string",
					"description": "Target stage in a multi-stage build."
				},
				"args": {
					"type": "object",
					"additionalProperties": {
						"type": [
							"string"
						]
					},
					"description": "Build arguments."
				},
				"cacheFrom": {
					"type": [
						"string",
						"array"
					],
					"description": "The image to consider as a cache. Use an array to specify multiple images.",
					"items": {
						"type": "string"
					}
				}
			}
		},
		"imageContainer": {
			"type": "object",
			"properties": {
				"image": {
					"type": "string",
					"description": "The docker image that will be used to create the container."
				}
			},
			"required": [
				"image"
			]
		},
		"composeContainer": {
			"type": "object",
			"properties": {
				"dockerComposeFile": {
					"type": [
						"string",
						"array"
					],
					"description": "The name of the docker-compose file(s) used to start the services.",
					"items": {
						"type": "string"
					}
				},
				"service": {
					"type": "string",
					"description": "The service you want to work on."
				},
				"runServices": {
					"type": "array",
					"description": "An array of services that should be started and stopped.",
					"items": {
						"type": "string"
					}
				},
				"workspaceFolder": {
					"type": "string",
					"description": "The path of the workspace folder inside the container. This is typically the target path of a volume mount in the docker-compose.yml."
				},
				"shutdownAction": {
					"type": "string",
					"enum": [
						"none",
						"stopCompose"
					],
					"description": "Action to take when the VS Code window is closed. The default is to stop the containers."
				},
				"overrideCommand": {
					"type": "boolean",
					"description": "Whether to overwrite the command specified in the image. The default is false."
				}
			},
			"required": [
				"dockerComposeFile",
				"service",
				"workspaceFolder"
			]
		}
	},
	"oneOf": [
		{
			"allOf": [
				{
					"oneOf": [
						{
							"allOf": [
								{
									"oneOf": [
										{
											"$ref": "#/definitions/dockerfileContainer"
										},
										{
											"$ref": "#/definitions/imageContainer"
										}
									]
								},
								{
									"$ref": "#/definitions/nonComposeBase"
								}
							]
						},
						{
							"$ref": "#/definitions/composeContainer"
						}
					]
				},
				{
					"$ref": "#/definitions/devContainerCommon"
				}
			]
		},
		{
			"type": "object",
			"$ref": "#/definitions/devContainerCommon",
			"additionalProperties": false
		}
	]
}