// 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.234.0/containers/go
{
  "name": "Go",
  "build": {
    "dockerfile": "Dockerfile.devcontainer",
    "args": {
      // Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
      // Append -bullseye or -buster to pin to an OS version.
      // Use -bullseye variants on local arm64/Apple Silicon.
      "VARIANT": "1-bullseye",
      // Options
      "NODE_VERSION": "lts/*"
    }
  },
  "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],

  // Set *default* container specific settings.json values on container create.
  "settings": {
    "go.toolsManagement.checkForUpdates": "local",
    "go.useLanguageServer": true,
    "go.gopath": "/home/btwiuse/go"
  },

  // 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" ],

  // Add the IDs of extensions you want installed when the container is created.
  "extensions": [
	"golang.Go",
	"denoland.vscode-deno",
	"GitHub.copilot",
	"ms-azuretools.vscode-docker",
	"BazelBuild.vscode-bazel",
	"rust-lang.rust-analyzer",
	"ms-python.python",
	"tamasfe.even-better-toml",
	"coolbear.systemd-unit-file"
],

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

  // Use 'postCreateCommand' to run commands after the container is created.
  "postCreateCommand": "sudo chmod 777 /var/run/docker.sock",

  // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
  "remoteUser": "btwiuse",
  "features": {
  }
}
