Skip to content

Instantly share code, notes, and snippets.

@andreroggeri
Created October 9, 2019 00:08
Show Gist options
  • Save andreroggeri/338f79fc93288b1664fa737b787db644 to your computer and use it in GitHub Desktop.
Save andreroggeri/338f79fc93288b1664fa737b787db644 to your computer and use it in GitHub Desktop.
Dockerfile for running angular unit tests
FROM node:10
# Install Chromium.
RUN \
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 install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
# Define working directory.
WORKDIR /data
# Define default command.
COPY . /data
RUN apt install -y python make g++
RUN npm i
CMD [ "./node_modules/@angular/cli/bin/ng", "test" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment