The Visual Studio Code Remote Containers for TypeScript projects
1.1K

The Visual Studio Code Remote Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set.
A devcontainer.json file in your project tells VS Code how to access a development container with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase.
In your project, create .devcontainer/devcontainer.json [?] :
{
"name": "TypeScript",
"image": "ealen/codespaces-typescript",
"extensions": [
// TypeScript
"dbaeumer.vscode-eslint",
"oouo-diogo-perdigao.docthis",
// Files
"bungcip.better-toml",
"yzhang.markdown-all-in-one",
// Global
"editorconfig.editorconfig",
"gruntfuggly.todo-tree",
// Front
"naumovs.color-highlight",
// Theme
"vscode-icons-team.vscode-icons",
// Docker
"ms-azuretools.vscode-docker"
],
"settings": {
"eslint.alwaysShowStatus": true,
"workbench.iconTheme": "vscode-icons",
"editor.fontFamily": "Consolas, 'Courier New', monospace, hack, 'Hack Nerd Font Mono'",
"terminal.integrated.fontFamily": "Consolas, 'Hack Nerd Font Mono'",
"terminal.integrated.fontSize": 14
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "npm ci",
"mounts": [
"source=/home/ealen/.ssh,target=/home/user/.ssh,type=bind,readonly",
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
]
}
An example is available here.
/!\ You must install Nerd Font "Hack Nerd Font Mono" /!\
Content type
Image
Digest
Size
464.8 MB
Last updated
over 4 years ago
docker pull ealen/codespaces-typescript