Skip to content

Instantly share code, notes, and snippets.

@badgeek
Created July 23, 2024 06:02
Show Gist options
  • Select an option

  • Save badgeek/ce9f769bfb59bf90b43ee0d525b86727 to your computer and use it in GitHub Desktop.

Select an option

Save badgeek/ce9f769bfb59bf90b43ee0d525b86727 to your computer and use it in GitHub Desktop.
FROM cypress/browsers
# Set the working directory
WORKDIR /opt/app
# Copy package.json and package-lock.json (if available)
COPY package*.json ./
# Install dependencies
RUN npm ci
# Install Cypress binary
RUN npx cypress install
# Copy the Cypress configuration file (if exists)
COPY cypress.json .
# Copy the Cypress test files
COPY cypress ./cypress
@badgeek
Copy link
Author

badgeek commented Jul 23, 2024

docker build . -f Dockerfile.browsers -t test-browsers
docker run -it --rm test-browsers npx cypress run -b chrome

@badgeek
Copy link
Author

badgeek commented Jul 23, 2024

yarn install --frozen-lockfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment