cypress-example-docker-compose icon indicating copy to clipboard operation
cypress-example-docker-compose copied to clipboard

cypress interactive mode on a port of a ec2 Amazon Linux 2 machine

Open ralexrdz opened this issue 3 years ago • 1 comments

Hey. I've been trying to serve the cypress interactive mode on a port of a ec2 Amazon Linux 2 machine

I've follow unsuccesfully these examples

What I'm trying to achive is this:

  • Run cypress interactive mode on a port of the ec2 machine
  • Expose that port to the public
  • Give a link to a non-tech QA colleage, where he/she can run and see the tests happening

Is this possible?

I've tried installing MATE desktop and the server, using Xvfb

Xvfb -screen 0 1920x1080x24 :99 & export DISPLAY=:99

and sending the Display variable to docker cypress images: included and base

also with TiggerVNC

I've tried to send X11-unix as a volume and also my dbus socket

docker run -it \
  -v $PWD:/e2e \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -w /e2e \
  -e DISPLAY \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
--entrypoint cypress \
  cypress/included:10.3.0 open

MAIN QUESTIONS:

Is the cypress:included the best image for this? Is it really possible?

Main errors?

ralexrdz avatar Jul 01 '22 02:07 ralexrdz

The cypress GUI will not work without setting up display with IP.

Can you share your dockerfile and docker-compose?

Meanwhile, you can try this:

  1. In your docker-compose file, add the following in the volume of the cypress container: ~/.Xauthority:/root/.Xauthority:rw
  2. In your Dockerfile: Use image cypress/browsers and install the dependencies RUN apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

arorahanisha50 avatar Aug 07 '22 09:08 arorahanisha50