// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
	"name": "Node.js & TypeScript",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/typescript-node",
	"runArgs": [
		"--network=matterbridge_homekit",
		"--ip=192.168.62.54",
		"--name=matterbridge_dev"
	],
	// Features to add to the dev container. More info: https://containers.dev/features.
	// "features": {},
	"mounts": [
		// Mount the local directory to /workspaces in the container.
		"source=${localWorkspaceFolder}/.matterbridge/,target=/home/node/.matterbridge/,type=bind,consistency=cached",
		"type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,readonly"
	],
	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	//"forwardPorts": [ 8283, 5540 ],
	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "sudo npm install matterbridge -g && npm install && npm run matterbridge:add && sudo npm link matterbridge && npm link",
	// Configure tool-specific properties.
	"customizations": {
		"vscode": {
			// Extensions to install in the dev container
			"extensions": [
				"dbaeumer.vscode-eslint",
				"esbenp.prettier-vscode",
				"github.vscode-github-actions",
				"github.vscode-pull-request-github"
			],
			// Settings for the VS Code environment
			"settings": {
				"eslint.format.enable": true,
				"eslint.useFlatConfig": true,
				"editor.formatOnSave": true,
				"terminal.integrated.shell.linux": "/bin/bash",
				"terminal.integrated.scrollback": 10000
			}
		}
	}
	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
}