NodeJS (18, 20, 22, 23, 24, 25, 26) with additional tools helpful for CI environments.
10K+
Provides a vanilla NodeJS (https://hub.docker.com/_/node/) image with several helpful tools for CI runners.
Current inclusions are:
Example usage with Angular:
const isDocker = require('is-docker')();
module.exports = function (config) {
config.set({
...
browsers: ['ChromeCustom'],
customLaunchers: {
ChromeCustom: {
base: 'ChromeHeadless',
// We must disable the Chrome sandbox when running Chrome inside Docker (Chrome's sandbox needs
// more permissions than Docker allows by default)
flags: isDocker ? ['--no-sandbox'] : []
}
},
singleRun: true,
restartOnFileChange: false
});
};
Then ng test is able to utilize the ChromeHeadless environment. Docker does not let it be run without --no-sandbox which is was drove the addition of the isDocker check.
ARG NODE_VERSION="23"
FROM node:${NODE_VERSION}-slim
# Install the required packages
RUN apt-get update && apt-get install git curl wget gnupg -y &&\
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&\
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\
apt-get update &&\
apt-get -y install google-chrome-stable xvfb &&\
apt-get clean -y &&\
npm install -g tslint eslint codelyzer stylelint
# Specifies the default working directory
WORKDIR /usr/app
Content type
Image
Digest
sha256:4c398aab9…
Size
483.2 MB
Last updated
18 days ago
docker pull kchason/nodejs-ci