Introducing our new CEO Don Johnson - Read More

Node.js & Typescript Development Container Images

Verified Publisher

devcontainers/typescript-node

By Microsoft

Updated 8 months ago

A dev container spec-supported image for working with TypeScript.

3

Node.js & TypeScript

About

Develop Node.js based applications in TypeScript. Includes Node.js, eslint, nvm, yarn, and the TypeScript compiler.

MetadataValue
CategoriesCore, Languages
Image typeDockerfile
Published imagemcr.microsoft.com/devcontainers/typescript-node
Available image variants22 / 22-bookworm, 20 / 20-bookworm, 18 / 18-bookworm, 20-bullseye, 18-bullseye (full list)
Published image architecture(s)x86-64, arm64/aarch64 for bookworm, and bullseye variants
Container host OS supportLinux, macOS, Windows
Container OSDebian
Languages, platformsNode.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:22 (or 22-bookworm, 22-bullseye to pin to an OS version)
  • mcr.microsoft.com/devcontainers/typescript-node:20 (or 20-bookworm, 20-bullseye to pin to an OS version)
  • mcr.microsoft.com/devcontainers/typescript-node:18 (or 18-bookworm, 18-bullseye to pin to an OS version)

Refer to this guide for more details.

You can decide how often you want updates by referencing a semantic version of each image. For example:

  • mcr.microsoft.com/devcontainers/typescript-node:1-22 (or 1-22-bookworm, 1-22-bullseye)
  • mcr.microsoft.com/devcontainers/typescript-node:1-22 (or 1-22-bookworm, 1-22-bullseye)
  • mcr.microsoft.com/devcontainers/typescript-node:1.1-22 (or 1.1-22-bookworm, 1.1-22-bullseye)
  • mcr.microsoft.com/devcontainers/typescript-node:1.1.0-22 (or 1.1.0-22-bookworm, 1.1.0-22-bullseye)

However, we only do security patching on the latest non-breaking, in support versions of images (e.g. 1-1.20). 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!, a non-root node user with sudo access, and a set of common dependencies for development. Since tslint is now fully deprecated, the image includes tslint-to-eslint-config globally to help you migrate.

Note that, while eslintand typescript are installed globally for convenience, as of ESLint 6, you will need to install the following packages locally to lint TypeScript code: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, typescript.

Support

The dev container spec images are maintained in the devcontainers/images repo. You can explore each image and open issues or feature requests.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE

Docker Pull Command

docker pull mcr.microsoft.com/devcontainers/typescript-node