How to avoid authentication when connecting to standalone chrome debug container?

7.7k Views Asked by At

I am using selenium/standalone-chrome-debug.

By default connecting to the container via VNC will trigger an authentication prompt which can be avoided by setting an environment variable as per the documentation:

If you want to run VNC without password authentication you can set the environment variable VNC_NO_PASSWORD=1.

When I start the container with the following command, I'm still prompted for the password:

docker run -d -p 4444:4444 -p 0:5900 -v /dev/shm:/dev/shm -e VNC_NO_PASSWORD=1 selenium/standalone-chrome-debug

As you can see in the following screencast:

  • I'm still asked for a password
  • Trying to authenticate without password fails
  • When I use the default password (secret), it passes

Question: how do I avoid authentication completely?

enter image description here

2

There are 2 best solutions below

1
On BEST ANSWER

Adding

  VNC_NO_PASSWORD: 1

to the environment of the relevant service in docker-compose.yml worked for me.

0
On
services:
 firefox:
  image: node-firefox:4.16.1-20231219
  shm_size: 2gb
  depends_on:
   - selenium-hub
  environment:
   - SE_EVENT_BUS_HOST=selenium-hub
   - SE_EVENT_BUS_PUBLISH_PORT=4442
   - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
   - SE_VNC_NO_PASSWORD= true