Skip to content

Commit 84335af

Browse files
committed
Update devcontainers document
1 parent cc0025a commit 84335af

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

content/articles/containers/devcontainers.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
---
22
title: DevContainers
3+
description: A collection of notes on DevContainers
34
topics:
45
- containers
56
- docker
67
- vscode
78
---
89

9-
For now, this page is just a quick collection of notes on DevContainers (especially the VSCode integration).
10+
A collection of notes on DevContainers (especially the VSCode integration).
1011

11-
## VSCode DevContainers
12+
## Basic
1213

13-
Usually, you have two files in the `.devcontainer` folder:
14+
To use DevContainers, you need to create a file named `.devcontainer/devcontainers.json` in your project. For contents, see below.
15+
16+
> [!NOTE]
17+
> You can't set the name of the devcontainer as Docker sees/displays it.
18+
19+
## Links
20+
21+
* [DevContainers Quick Start](https://code.visualstudio.com/docs/devcontainers/tutorial)
22+
* [devcontainer.json reference](https://aka.ms/devcontainer.json)
23+
* [Pre-Built DevContainer Images](https://github.com/devcontainers/images/tree/main/src)
24+
25+
## Minimal Example
26+
27+
```json
28+
{
29+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu"
30+
}
31+
```
32+
33+
## Extended Example with Dockerfile
1434

1535
### devcontainers.json
1636

0 commit comments

Comments
 (0)