cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1k stars 376 forks source link

docs: remove non-working base-internal Dockerfile example #1125

Closed MikeMcC399 closed 1 week ago

MikeMcC399 commented 2 weeks ago

Issue

Multiple cypress/base-internal/releases/node-18 README files include text similar to:

Sample Dockerfile

FROM cypress/base-internal:18.20.2
RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run

Building using this Dockerfile e.g. docker build . -t test fails with:

  1. npm ERR! Tracker "idealTree" already exists

  2. [4/5] RUN $(npm bin)/cypress verify: 0.503 /bin/sh: 1: Unknown: not found

The Dockerfile example is outdated.

  1. See https://stackoverflow.com/questions/57534295/npm-err-tracker-idealtree-already-exists-while-creating-the-docker-image-for says for Node.js > 14 it is necessary to specify a WORKDIR in Dockerfile

  2. $(npm bin)/cypress run does not work with npm version 9.x or higher. The command npm bin has been removed - see npm v9.0.0 released Oct 24, 2022

    npm bin has been removed (use npx or npm exec to execute binaries).

    Node.js 18.14.0 was the first release with npm 9.x bundled. Node.js 20.x includes npm 9.x and 10.x, Node.js 22.x includes npm 10.x.

Change

The non-working Dockerfile examples are removed. The examples do not seem to be used anywhere internally for testing in the https://github.com/cypress-io/cypress repo.

cypress-app-bot commented 2 weeks ago