You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,16 +25,18 @@ sudo -E ./install.sh
25
25
To enable bash completion, add the following to you `~/.bashrc` file:
26
26
27
27
```bash
28
-
.<(devcontainer completion)
28
+
.<(devcontainer completion bash)
29
29
```
30
30
31
31
## Usage
32
32
33
-
### Listing devcontainers
33
+
### Working with devcontainers
34
+
35
+
#### Listing devcontainers
34
36
35
37
To see which running devcontainers the CLI detects you can run the `list` command.
36
38
37
-
### Running commands inside a devcontainer
39
+
####Running commands inside a devcontainer
38
40
39
41
`devcontainer` allows you to run commands in devcontainers. This is similar to `docker exec` but works with devcontainer names (rather than requiring container names/IDs).
TODO: Add docs on the folder structure for adding custom templates
78
+
79
+
#### Listing templates
80
+
81
+
Running `devcontainer template list` will show the templates that `devcontainer` discovered
82
+
83
+
#### Adding a devcontainer
84
+
85
+
To add the files for a devcontainer definition to your project, change directory to the folder you want to add the devcontainer to and then run:
86
+
87
+
```bash
88
+
# Add the go template
89
+
devcontainer template add go
90
+
```
91
+
92
+
This will copy in the template files for you to modify as you wish.
93
+
94
+
#### Adding a link to a devcontainer
95
+
96
+
If you are working with a codebase that you don't want to commit the devcontainer definition to (e.g. an OSS project that doesn't want a devcontainer definition), you can use the `template add-link` command. Instead of copying template files it creates symlinks to the template files and adds a `.gitignore` file to avoid accidental git commits.
97
+
98
+
As with `template add`, run this from the folder you want to add the devcontainer to:
0 commit comments