Start Building for Free
CircleCI.comAcademyBlogCommunitySupport
  • cimg/node
  • Getting Started
  • How This Image Works
  • Image Tags
  • Variants
    • Browsers
  1. Convenience Images
  2. cimg/node

cimg/node

Sections

This image is designed to supercede the legacy CircleCI Node.js image, circleci/node.

cimg/node is a Docker image created by CircleCI with continuous integration builds in mind. Each tag contains a version of Node.js, npm, yarn v1, and any binaries and tools that are required for builds to complete successfully in a CircleCI environment.

Getting Started

This image can be used with the CircleCI docker executor. For example:

1 2 3 4 5 6 7 jobs: build: docker: - image: cimg/node:23.1.0 steps: - checkout - run: node --version

In the above example, the CircleCI Node.js Docker image is used for the primary container. More specifically, the tag 23.1.0 is used meaning the version of Node.js will be Node.js v23.1.0. You can now use Node.js within the steps for this job.

How This Image Works

This image contains the Node.js programming language and its package managers. This includes npm and yarn.

Tagging Scheme

This image has the following tagging scheme:

cimg/node:<node-version>

<node-version> - The version of Node.js to use. This can be a full SemVer point release (such as 10.16.3), or just the minor release (such as 12.6), or a version alias. This Node.js image has two version aliases, "current" and "lts". This aliases will always point to the latest "current" and latest "lts" releases that Node.js has as according to their website. Keep in mind that using an alias tag will be less stable that specifying a full SemVer version. If you use the minor release tag, it will automatically point to future patch updates as they are released by Node.js. For example, the tag 12.6 points to Node.js v12.6.0 now, but when the next release comes out, it will point to Node.js v12.6.1.

Image Tags

Variants

Variant images typically contain the same base software, but with a few additional modifications.

Browsers

The browsers variant is the same Node.js image but with Java, Selenium, and browser dependencies pre-installed via apt. The browsers variant can be used by appending -browser to the end of an existing cimg/node tag. The browsers variant is designed to work in conjunction with the CircleCI Browser Tools orb. You can use the orb to install a version of Google Chrome and/or Firefox into your build. The image contains all of the supporting tools needed to use both the browser and its driver.

1 2 3 4 5 6 7 8 9 10 11 12 13 orbs: browser-tools: circleci/browser-tools@1.1.0 jobs: build: docker: - image: cimg/node:15.0.1-browsers steps: - browser-tools/install-browser-tools - checkout - run: | node --version java --version google-chrome --version
Developer Updates
Get tips to optimize your builds
Or join our research panel and give feedback
By submitting this form, you are agreeing to ourTerms of UseandPrivacy Policy.