Docker image based on node official image with Google Chrome installed
1.8K
This is a Docker image based on node with Google Chrome installed.
You can build the image like this:
#!/usr/bin/env bash
docker build --no-cache \
-t "rubensa/node-chrome" \
--label "maintainer=Ruben Suarez <[email protected]>" \
.
You can run the container like this (change --rm with -d if you don't want the container to be removed on stop):
#!/usr/bin/env bash
prepare_docker_timezone() {
# https://www.waysquare.com/how-to-change-docker-timezone/
ENV_VARS+=" --env=TZ=$(cat /etc/timezone)"
}
prepare_docker_timezone
docker run --rm -it \
--name "node-chrome" \
${ENV_VARS} \
rubensa/node-chrome
You can connect to the running container like this:
#!/usr/bin/env bash
docker exec -it \
node-chrome \
bash -l
You can stop the running container like this:
#!/usr/bin/env bash
docker stop \
node-chrome
If you run the container without --rm you can start it again like this:
#!/usr/bin/env bash
docker start \
node-chrome
If you run the container without --rm you can remove once stopped like this:
#!/usr/bin/env bash
docker rm \
node-chrome
Content type
Image
Digest
Size
514.6 MB
Last updated
almost 5 years ago
docker pull rubensa/node-chrome