// 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/javascript-node
{
  "name": "Dev Dictation Server",
  "dockerComposeFile": [
    "docker-compose.yml"
  ],
  "service": "dictation_server",
  // コンテナを自動停止させない
  "shutdownAction": "none",
  "workspaceFolder": "/app/dictation_server",
  "runArgs": [
    "--cap-add=SYS_PTRACE",
    "--security-opt",
    "seccomp=unconfined"
  ],
  // Set *default* container specific settings.json values on container create.
  "settings": {
    "terminal.integrated.shell.linux": "/bin/bash",
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
    "eslint.format.enable": false,
    "[javascript]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[json]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    // formatter
    "editor.formatOnPaste": true,
    "editor.formatOnType": true,
    "editor.renderWhitespace": "all",
    "editor.insertSpaces": false,
    "editor.renderLineHighlight": "all"
  },
  // Add the IDs of extensions you want installed when the container is created.
  "extensions": [
    "dbaeumer.vscode-eslint",
    "salbert.comment-ts",
    "gruntfuggly.todo-tree",
    "esbenp.prettier-vscode",
    "ms-vsliveshare.vsliveshare",
    "albymor.increment-selection",
    "eamodio.gitlens",
    "wmaurer.change-case"
  ],
  // Use 'postCreateCommand' to run commands after the container is created.
  // "postCreateCommand": "yarn install",
  "postCreateCommand": "sudo chown -R vscode:vscode /app/dictation_server",
  // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
  "remoteUser": "vscode"
}