aboutsummaryrefslogtreecommitdiff
path: root/.devcontainer/devcontainer.json
blob: 1350bae4ec1fc1351bbf0ba8ab543cd8be5684c9 (plain) (blame)
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
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/docker-existing-dockerfile
{
  "name": "bun (Ubuntu)",

  // Sets the run context to one level up instead of the .devcontainer folder.
  "context": "..",

  // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
  "dockerFile": "../Dockerfile",

  // Set *default* container specific settings.json values on container create.
  "settings": {
    "terminal.integrated.shell.linux": "/bin/zsh",
    "zigLanguageClient.path": "/home/ubuntu/zls/zig-out/bin/zls",
    "zig.zigPath": "/build/zig/zig",
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },

  // Add the IDs of extensions you want installed when the container is created.
  "extensions": [
    "AugusteRame.zls-vscode",
    "ms-vscode.cpptools",
    "/home/ubuntu/vscode-zig.vsix",
    "vadimcn.vscode-lldb",
    "esbenp.prettier-vscode",
    "xaver.clang-format"
  ],
  "postCreateCommand": "cd /build/bun; bash /build/getting-started.sh; zsh",

  "build": {
    "target": "bun.devcontainer",
    "cacheFrom": ["bun.devcontainer:latest"],
    "args": {}
  },
  "runArgs": [
    "--ulimit",
    "memlock=-1:-1",
    "--ulimit",
    "nofile=65536:65536",
    "--cap-add=SYS_PTRACE",
    "--security-opt",
    "seccomp=unconfined"
  ],
  "workspaceMount": "source=bun,target=/build/bun,type=volume",
  "workspaceFolder": "/build/bun",
  "mounts": [
    "source=bun-install,target=/home/ubuntu/.bun,type=volume",
    "source=bun-config,target=/home/ubuntu/.config,type=volume"
  ],

  // Use 'forwardPorts' to make a list of ports inside the container available locally.
  "forwardPorts": [3000, 8081, 8080]

  // Uncomment the next line to run commands after the container is created - for example installing curl.
  // "postCreateCommand": "apt-get update && apt-get install -y curl",

  // Uncomment when using a ptrace-based debugger like C++, Go, and Rust

  // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
  // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

  // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
  // "remoteUser": "vscode"
}