Skip to content

Docker image with Node.js and Chromium for testing in headless browser

Notifications You must be signed in to change notification settings

lenneTech/node-chromium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

node-chromium Docker Image

Docker image with Node.js and Chromium for tests (with headless handling) and preinstalled Cypress (7.3.0) in App directory for faster CI/CD.

Version

Latest version: 0.3

Build local

docker build -t lennetech/node-chromium:latest .

Usage

Dockerfile:

# Use docker image
FROM lennetech/node-chromium

# Go to work directory
WORKDIR /usr/src/app

# Install 
COPY ["path/to/app/root-dir/package*.json", "./"]
RUN npm ci

# Test and build app
COPY ["path/to/app/root-dir/", "./"]
RUN npm run test:headless
RUN npm run build

docker-compose.yml:

version: "3.7"

services:
  frontend:
    build: .

Build and push to Docker Hub

Install docker: https://docs.docker.com/get-started/#download-and-install-docker-desktop

docker login --username=lennetech --password=PASSWORD
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 --push -t lennetech/node-chromium:latest .

(see How to build x86 (and others!) Docker images on an M1 Mac)

Sources

Documentation

Reference

About

Docker image with Node.js and Chromium for testing in headless browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published