Skip to content

Instantly share code, notes, and snippets.

@alfredlucero
Created August 3, 2020 17:26
Show Gist options
  • Save alfredlucero/8e20c989ab049a2039c4437aabf3e271 to your computer and use it in GitHub Desktop.
Save alfredlucero/8e20c989ab049a2039c4437aabf3e271 to your computer and use it in GitHub Desktop.
Cypress Tips/Tricks - Cypress Dockerfile
# Dockerfile
# Use Cypress's base image to help set up the environment/dependencies
FROM cypress/base:12.6.0
# This helps to clean up the console output
ENV CI=1
# Proceed with installing Node dependencies
RUN mkdir -p /opt/frontendapp/
WORKDIR /opt/frontendapp/
COPY package.json /opt/frontendapp/
COPY package-lock.json /opt/frontendapp/
RUN npm ci
# Copy over application code and installed node_modules
COPY . /opt/frontendapp
WORKDIR /opt/frontendapp
# Verify Cypress installation worked
RUN ./node_modules/.bin/cypress verify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment