0

I am trying to execute the script in mcr.microsoft.com/playwright:bionic docker container .

I have exposed the port 5900 as shown below but unable to connect to host when i tried with the vnc viewer localhost:5900. I can able to view other docker container such as selenium/standalone-chrome execution through vnc viewer but not playwright !

How can I view the playwright docker container test execution ? is any other way that i can see the test execution live ? Any help would be much appreciated !

 docker run --name playwright1 -it --rm --ipc=host --cap-add=SYS_ADMIN -u root -p 5900:5900 -v $(pwd):/src -v /home/Automation/:/root/.m2 mcr.microsoft.com/playwright:bionic  &
demouser123
  • 4,108
  • 9
  • 50
  • 82

1 Answers1

1

You have exposed the port, but is a vnc server & x-server like Xvfb running inside the container? Opening the port won't accomplish anything if there isn't anything listening on the other side.

This question has great information on how to setup both xvfb and x11vnc to achieve what you are trying to do. Just add FROM mcr.microsoft.com/playwright:focal to the top of your own Dockerfile, followed by the stuff in the linked answer.

Nico Mee
  • 869
  • 5
  • 6