5
I am using Docker Compose to climb a set of three containers "Selenium Grid":
selenium-hub:
image: selenium/hub
container_name: selenium-hub
ports:
- 4444:4444
nodeff:
image: selenium/node-firefox
ports:
- 5900
links:
- selenium-hub:hub
nodechrome:
image: selenium/node-chrome
ports:
- 5900
links:
- selenium-hub:hub
The Grid works perfectly. But when I need to climb another container with "Maven", using another Docker Compose File, passing the link parameter as "Selenium-hub:hub", the process fails.
Maven Docker Compose File:
maven-test:
build: .
volumes:
- ./Screenshots:/MeuProjeto/Screenshots
links:
- selenium:hub
Docker File from Maven:
FROM maven
#RUN mkdir /NaturaSiteNG
#WORKDIR /NaturaSiteNG
#COPY . /NaturaSiteNG
ENTRYPOINT curl http://selenium-hub:4444
Error message:
ERROR: Service 'maven-test' has a link to service 'selenium:hub' which is undefined.
But when climbing the container straight up the "Docker run", everything works perfectly.
docker run -it --link selenium-hub:hub maven
I wonder what I’m setting wrong?