# Node.js & TypeScript ## Summary *Develop Node.js based applications in TypeScript. Includes Node.js, eslint, nvm, yarn, and the TypeScript compiler.* | Metadata | Value | |----------|-------| | *Categories* | Core, Languages | | *Image type* | Dockerfile | | *Published image* | mcr.microsoft.com/devcontainers/typescript-node | | *Available image variants* | 26 / 26-trixie, 24 / 24-trixie, 22 / 22-trixie, 26-bookworm, 24-bookworm, 22-bookworm ([full list](https://mcr.microsoft.com/v2/devcontainers/typescript-node/tags/list)) | | *Published image architecture(s)* | x86-64, arm64/aarch64 for `trixie` and `bookworm` variants | | *Container host OS support* | Linux, macOS, Windows | | *Container OS* | Debian | | *Languages, platforms* | Node.js, TypeScript | ## Using this image You can directly reference pre-built versions of `Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` to one of the following. An example `Dockerfile` is included in this repository. - `mcr.microsoft.com/devcontainers/typescript-node` (latest) - `mcr.microsoft.com/devcontainers/typescript-node:26` (or `26-trixie`, `26-bookworm` to pin to an OS version) - `mcr.microsoft.com/devcontainers/typescript-node:24` (or `24-trixie`, `24-bookworm` to pin to an OS version) - `mcr.microsoft.com/devcontainers/typescript-node:22` (or `22-trixie`, `22-bookworm` to pin to an OS version) Refer to [this guide](https://containers.dev/guide/dockerfile) for more details. We publish stable releases and experimental development images (`dev-*`, which contain the latest available changes from `main`). Latest stable: `mcr.microsoft.com/devcontainers/typescript-node:latest` ([MCR](https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/typescript-node/tag/latest)). Other stable releases can be found at: [MCR Tags](https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/typescript-node/tags). Development images use the `dev-` prefix, for example `mcr.microsoft.com/devcontainers/typescript-node:dev-26`, and may be updated in place; pin the image for reproducibility. The examples below demonstrate stable image [semantic versioning](https://semver.org/); see the links above for current tags. - `mcr.microsoft.com/devcontainers/typescript-node:5-26` (or `5-26-trixie`, `5-26-bookworm`) - `mcr.microsoft.com/devcontainers/typescript-node:5.2-26` (or `5.2-26-trixie`, `5.2-26-bookworm`) - `mcr.microsoft.com/devcontainers/typescript-node:5.2.5-26` (or `5.2.5-26-trixie`, `5.2.5-26-bookworm`) However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `5-26`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates. Beyond TypeScript, Node.js, and `git`, this image / `Dockerfile` includes `eslint`, `zsh`, [Oh My Zsh!](https://ohmyz.sh/), a non-root `node` user with `sudo` access, and a set of common dependencies for development. Since `tslint` is [now fully deprecated](https://github.com/palantir/tslint/issues/4534), the image includes `tslint-to-eslint-config` globally to help you migrate. Note that, while `eslint`and `typescript` are installed globally for convenience, [as of ESLint 6](https://eslint.org/docs/user-guide/migrating-to-6.0.0#-plugins-and-shareable-configs-are-no-longer-affected-by-eslints-location), you will need to install the following packages locally to lint TypeScript code: `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`, `eslint`, `typescript`. ## License Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See [LICENSE](https://github.com/devcontainers/images/blob/main/LICENSE)