I’m having a problem connecting from my host container to
selenium/standalone-chrome (and perhaps back).
- Capybara server is run on the host container at
- Test code determines the host’s advertised IP address e.g.
- Capybara Instructions execute on
selenium/standalone-chromecontainer via api call to
http://127.0.0.1:4444/wd/huband gives it urls such as
http://dummy.com.184.108.40.206.xip.io:4100to visit the server on the host container.
- This works on an OSX host with manually running the selenium container with
docker run -p 4444:4444 selenium/standalone-chrome:3.0.1-germanium
Interaction (host ip
- host api call to selenium ->
- selenium browser visit ->
This abbreviated snippet shows the relevant parts:
version: 2 executorType: docker containerInfo: - image: alienfast/ruby:1.0.3 env: - RAILS_ENV=test - image: selenium/standalone-chrome:3.0.1-germanium jobs: build: working_directory: /root/af steps: - checkout - run: name: Run tests command: | mkdir -p test-reports/cucumber bundle exec rake "knapsack_pro:cucumber[--format junit --out test-reports/cucumber/junit.xml]"
I had tried to manually run the image like I do locally but that didn’t work and seemed unnecessary, so I changed to run the same as I do mysql and bound to the host container, but experience the same error.
What am I missing?
- Should capybara test code be able to connect to selenium on
127.0.0.1:4444with this configuration?
- Should the selenium container be able to connect to the host container at
- How can I debug this on the server - does
add-ssh-keysallow me to login to 2.0?