wkeeling / selenium-wire

Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
MIT License
1.89k stars 248 forks source link

Create Selenium Wire Docker image #243

Open wkeeling opened 3 years ago

wkeeling commented 3 years ago

Make available on Docker Hub.

h4r5h1t commented 2 years ago

Hey, @wkeeling any update on this issue?? If not can you give me some suggestions that how to run selenium-wire inside docker? means I want to use selenium-wire inside the docker-composed file where I'm using selenium hub for remote connection. This is the docker-composed file that I'm currently using

 version: "3"
services:
  chrome:
    image: selenium/node-chrome:4.1.2-20220131
    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
    networks:
      - selenium

  firefox:
    image: selenium/node-firefox:4.1.2-20220131
    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
    networks:
      - selenium

  selenium-hub:
    image: selenium/hub:4.1.2-20220131
    # container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"
    networks:
      - selenium

networks:
  selenium:
    driver: bridge

But I don't where I have to run selenium-wire in the documentation it mentioned that add the IP address of the machine where selenium-wire is running in sw_option "addr" but I don't get what you mean by that or how I run selenium-wire in the different machine inside the docker and connect it with my selenium hub.