Sign inSign up

andrewmackrodt/nodejs-chromium

By andrewmackrodt

Updated 4 months ago

Node.js 16.x, npm, yarn and chromium for SSR.

Image
0

10K+

andrewmackrodt/nodejs-chromium repository overview

andrewmackrodt/docker-nodejs-chromium

Status Pulls Dockerfile Size Version

Node.js 24.x image with npm, yarn and chromium for applications requiring a headless browser, e.g. to for SSR.

See andrewmackrodt/docker-nodejs for more details.

Usage

Important

This image exports the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true.

docker
# start interactive mode
docker run --rm -it andrewmackrodt/nodejs-chromium

# print version
docker run --rm andrewmackrodt/nodejs-chromium --version

# run npm install in the current directory
docker run --rm -it \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -v $PWD:/app \
  -w /app \
  andrewmackrodt/nodejs-chromium npm install

# run yarn install in the current directory
docker run --rm -it \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -v $PWD:/app \
  -w /app \
  andrewmackrodt/nodejs-chromium yarn install

Parameters

ParameterFunction
-e PUID=1000The user id, recommended: $(id -u)
-e PGID=1000The group id, recommended: $(id -g)
-e SUDO_NOPASSWD=0Set to 1 to allow passwordless sudo
-e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=trueSet to false if using puppeteer and you don't want to use the bundled chromium browser

Tag summary

Content type

Image

Digest

sha256:b7c79f36f

Size

364.6 MB

Last updated

4 months ago

docker pull andrewmackrodt/nodejs-chromium