1

I have 4 containers running in the same Docker network

  • mongodb
  • our api server
  • a selenium server
  • our tests themselves

I get this error from our test container:

 WebDriverError: File not found: /root/cdt-tests/csv-data/IT-DE-Jasper.csv

However, from my test logs, this file totally exists...in the test container.

The problem, I think, is that the selenium server is not looking at the same filesystem as our test container, because they are running in different containers.

What is the best way to solve this problem?

a. Should I try to run them in the same container?

b. Can I somehow get them to share the same filesystem?

c. ?

3
  • 3
    Possible duplicate of In Docker, how can I share files between containers and then save them to an image? Commented May 23, 2017 at 23:29
  • Yes, but are we entirely sure that this is a solution to the problem? I am not 100% certain that the problem is that selenium server cannot find the file because the selenium server is running on a different filesystem...I am like 80% certain, but if someone could back that up, that would help. Commented May 24, 2017 at 18:28
  • 1
    I'd try even if I was 30% certain. It won't hurt if it doesn't work. In such case just update the question with what you have tried. Commented May 25, 2017 at 8:00

2 Answers 2

1

Just because you are sharing the network doesn't mean you are sharing the volumes, see how to do that In Docker, how can I share files between containers and then save them to an image? as @alex-blex suggested

Sign up to request clarification or add additional context in comments.

Comments

0

You may be able to connect the containers using a user-defined network, as explained on Docker's site

If you've already done that, it might be an issue with the path to the file you're using in your test. Perhaps it wants an absolute path, because the containers are considered different entities on the Docker network

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.