Install Node.js

If you need a specific version of Node.js on an image other than the tugboatqa/node image, we recommend using NodeSource distributions to do so. The majority of Tugboat images are Debian-based.

For example, to install Node.js version 24.x on a PHP service:

 1services:
 2  php:
 3    image: tugboatqa/php:8
 4    commands:
 5      init:
 6        - apt-get update
 7        - apt-get install -y curl
 8        - curl -fsSL https://deb.nodesource.com/setup_24.x -o /tmp/nodesource_setup.sh
 9        - bash /tmp/nodesource_setup.sh
10        - apt-get install -y nodejs