I am connecting to selenium grid to run my selenium tests. The client code is dockerized using the below dockerfile
FROM gradle:7.2.0-jdk8
COPY src /home/app/src
COPY build.gradle /home/app
COPY settings.gradle /home/app
COPY Dockerfile /home/app
ADD ssl.crt /usr/local/share/ca-certificates/ssl.crt
RUN update-ca-certificates
WORKDIR /home/app
EXPOSE 80
ENTRYPOINT ["gradle", "--info", "clean", "test","-Denvironment=stagging","-Dtags=envr:stagging","-Dcucumber.options=--tags @envr=stagging" ]
Now When I run the container I get error "Grid URL could not be reached: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
Now if I run the same gradle command(EntryPoint) from my java workspace it all works fine. So probably some networking issue which I am not able to understand.
Queestions:
- Why is it not connecting the hub(Selenium grid)?
- Do I need chromeDriver,Xvnc etc in the client image to run my tests?