Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.78 KB

README.md

File metadata and controls

68 lines (50 loc) · 1.78 KB

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