Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to watch xvfb session that's inside a docker on remote server from my local browser?

I'm running a docker (That I built on my own), that's docker running E2E tests. The browser is up and running but I want to have another nice to have feature, I want the ability of watching the session online.

My docker run command is:

docker run -p 4444:4444 --name ${DOCKER_TAG_NAME} 
           -e Some_ENVs 
           -v Volume:Volume 
           --privileged 
           -d "{docker-registry}" >> /dev/null 2>&1

I'm able to export screenshots but in some cases it's not enough and the ability of watching what is the exact state of the test would be amazing. I tried a lot of options but I came to a dead end, Any help would be great.

  • My tests are in Python 2.7
  • My Docker base is ubuntu:14.04
  • My environment is in AWS (If that's matter)
  • The docker runs on Ubuntu servers.

  • I know it a duplicate of this but no one answered him so...

like image 325
Yonatan Kiron Avatar asked Aug 01 '16 17:08

Yonatan Kiron


1 Answers

There is a recent tool called Selenoid. It is launching browsers in Docker containers (i.e. headless as you require). It has a standalone UI capable to show live session screen via VNC. So you can launch multiple sessions in parallel and then look and even intercept actions happening in target browser. All this stuff perfectly works in cloud environment.

like image 95
vania-pooh Avatar answered Nov 06 '22 22:11

vania-pooh