I'm using Docker Compose to upload a set of three "Selenium Grid" containers:
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 upload 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
Maven Docker File:
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 by uploading the container directly through the docker run, everything works perfectly.
docker run -it --link selenium-hub:hub maven
What am I setting wrong?