Skip to content

Instantly share code, notes, and snippets.

@msabramo
Created July 26, 2019 21:13
Show Gist options
  • Save msabramo/2d5f18863db601e5ba6435f9405b9c63 to your computer and use it in GitHub Desktop.
Save msabramo/2d5f18863db601e5ba6435f9405b9c63 to your computer and use it in GitHub Desktop.
Cypress test Dockerfile
# use Cypress provided image with all dependencies included
FROM cypress/base:10
RUN node --version
RUN npm --version
RUN apt-get update && \
apt-get install -y locales && \
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && \
locale-gen
ENV LC_ALL=en_US.UTF-8
WORKDIR /usr/src/app
COPY package.json package-lock.json .npmrc ./
# avoid many lines of progress bars during install
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1
ENV DEBUG=cypress:cli,xvfb
# install NPM dependencies and Cypress binary
RUN npm ci
# check if the binary was installed successfully
RUN $(npm bin)/cypress verify
COPY . /usr/src/app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment