-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdevcontainer.json
58 lines (56 loc) · 1.9 KB
/
devcontainer.json
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
{
"name": "Jokes devcontainer",
//image can be the latest public dev container,
//or some locally build dev container based on https://github.com/LaggAt/ha-devcontainer
"image": "ghcr.io/laggat/ha-devcontainer:main",
//"image": "ha-devcontainer:dev",
//run scripts/postCreate.sh after successful container creation. '/bin/bash -x' shows every line executed.
"postCreateCommand": "/bin/bash -x ${containerWorkspaceFolder}/.devcontainer/scripts/postCreate.sh",
"postStartCommand": "/bin/echo ha-devcontainer started.",
"postAttachCommand": "/bin/echo ha-devcontainer attached.",
//publish ha on 9123 when started
"appPort": ["9123:8123"],
//install these vscode extensions
"extensions": [
// debug bash scripts
"rogalmic.bash-debug",
],
//use these devcontainer settings
"settings": {
//linux line breaks
"files.eol": "\n",
//prefer ZSH shell
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
},
//how to run the container, network mode, privileged, volumes, ...
"runArgs": [
"--name",
"devcontainer_jokes",
"--network",
"host",
"--privileged",
"-v", "/etc/machine-id:/etc/machine-id:ro",
//"-v", "/run/dbus:/run/dbus:ro",
"-v", "/run/user/1000/bus:/run/user/1000/bus",
"-v", "/dev:/dev:ro",
"-v", "/run/udev:/run/udev:ro",
"-v", "/run/docker.sock:/run/docker.sock:rw"
],
//Environment Variables to set in the dev container
"containerEnv": {},
//security options
"securityOpt": [
"seccomp:unconfined",
"apparmor:unconfined"
],
//user defaults to vscode, let's use root for easier handling for now
"remoteUser": "root",
"containerUser": "root",
//set context to the root folder (which is one up from ./.devcontainer)
"context": ".."
}