title: How to run testcafe from docker on remote selenium grid
body: <p>I want to run testcafe tests in the browser installed on remote machine using <a href="https://github.com/SeleniumHQ/docker-selenium" rel="nofollow noreferrer">selenium grid docker</a> image (selenium/standalone-chrome-debug). </p>
  
  <p>I'm able to execute testcafe tests in this remote browser from my local machine using command:</p>
  
  <p><code>SELENIUM_SERVER=http://&lt;remote machine IP&gt;:4444/wd/hub testcafe selenium:chrome tests/</code></p>
  
  <p>I can see that tests are executing and preview them in the browser when I connect to machine/docker container using VNC. Everything works perfectly. </p>
  
  <p>The problem is when instead of using above command I'm trying to execute tests from my local machine using docker. This is my <code>docker-compose.yml</code> file:</p>
  
  <pre><code> my-app:
      image: my-app:0.1
      ports:
        - "3000:3000"
   auit:
      build:
        context: .
        dockerfile: Dockerfile.auit.testcafe
      ports:
        - "1337:1337"
        - "1338:1338"
      shm_size: 2G
      environment:
      - SELENIUM_SERVER=http://&lt;remote machine IP&gt;:4444/wd/hub
      depends_on:
      - my-app
      entrypoint: ["/opt/testcafe/docker/testcafe-docker.sh", "selenium:chrome", "/tests"]
  </code></pre>
  
  <p>The content of <code>Dockerfile.auit.testcafe</code>:</p>
  
  <pre><code>FROM testcafe/testcafe
  WORKDIR /
  USER root
  COPY ./tests /tests
  RUN npm install testcafe-browser-provider-selenium
  </code></pre>
  
  <p>So, when I run: </p>
  
  <pre><code>docker-compose up auit
  </code></pre>
  
  <p>the browser is launched in my selenium grid, but it is trying to connect to IP of my local docker container instead of my machine. I was trying to use <code>--hostname</code> parameter to set IP of my local machine, but I'm receiving an error: </p>
  
  <pre><code>ERROR The specified "&lt;my IP&gt;" hostname cannot be resolved to the current machine.
  </code></pre>
  
  <p>How can I solve this problem?</p>