Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

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

Open
ralexrdz opened this issue Jul 1, 2022 · 1 comment
Open

Comments

@ralexrdz
Copy link

ralexrdz commented Jul 1, 2022

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?

@arorahanisha50
Copy link

arorahanisha50 commented Aug 7, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants