Building your own docker images of SeleniumHQ/docker-selenium

Path is wrong, use build: /etc/docker-selenium/StandaloneChromeDebug/ without .
If you try to cd to ./etc/docker-selenium/StandaloneChromeDebug/, you will get an error.

version: "3.5"
services:
   selenium-hub:
        container_name: selenium-hub
        build: /etc/docker-selenium/StandaloneChromeDebug/
        volumes:
            - /dev/shm:/dev/shm
        ports:
            - "4444:4444"
            - "5900:5900"
        environment:
           - HUB_HOST=selenium-hub
           - HUB_PORT=4444

Exapmle: enter image description here


You don't really need to go through all of the fuss of building new image unless you need to add something new in the image.

If you want to use the image as it is, use the following docker-compose configuration:

version: "3.5"
services:
  selenium-hub:
    container_name: selenium-hub
    image: selenium/standalone-chrome-debug
    volumes:
      - /dev/shm:/dev/shm
    ports:
      - "4444:4444"
      - "5900:5900"
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=4444

If you still want to use your image that you have built locally, use the following docker-compose configuration:

version: "3.5"
services:
  selenium-hub:
    container_name: selenium-hub
    build: /etc/docker-selenium/StandaloneChromeDebug/
    volumes:
      - /dev/shm:/dev/shm
    ports:
      - "4444:4444"
      - "5900:5900"
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=4444