I'm not sure if it is a bug or just me being stupid but here is the case.
I want to build my image based on StandaloneChromeDebug. Following the Wiki:
Pull the repo.
Generate image:
$ make standalone_chrome_debug
$ docker build --no-cache etc/docker-selenium/StandaloneChromeDebug/
selenium-hub:
container_name: selenium-hub
build: ./etc/docker-selenium/StandaloneChromeDebug/
volumes:
- /dev/shm:/dev/shm
ports:
- "4444:4444"
- "5900:5900"
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
And... nothing. The container is running (no errros) but Selenium doesn't work, container log is empty, /opt/
folder is empty. What am i doing wrong? How to debug the thing?
Deploy Selenium Grid by running Selenium Hub and then separate nodes for Chrome/Firefox combinations. These nodes would be connected to Selenium Grid. Create Docker image which would contain everything necessary for running tests (rvm, ruby) Run that image as a docker container and copy over content of our tests.
Running Selenium Tests in Docker. Once the Docker Desktop is installed, it can run a few docker images. You can either create a Docker image from scratch or pull an already configured base image from the Docker hub and then add on to it.
Docker compose is the tool using which you can Selenium Grid on multiple containers. You can deploy Selenium Grid with hub and nodes for parallel execution. Docker-compose uses YAML file to configure the application services like a hub, chrome and Firefox will be the services in this case.
Selenium Docker. The project is made possible by volunteer contributors who have put in thousands of hours of their own time, and made the source code freely available under the Apache License 2.0.
A Dockerfile is a text document that contains the instructions to assemble a Docker image. When we tell Docker to build our image by executing the docker build command, Docker reads these instructions, executes them, and creates a Docker image as a result. Let’s walk through the process of creating a Dockerfile for our application.
The docker build command builds Docker images from a Dockerfile and a “context”. A build’s context is the set of files located in the specified PATH or URL. The Docker build process can access any of the files located in this context. The build command optionally takes a --tag flag.
The docker tag command creates a new tag for an image. It does not create a new image. The tag points to the same image and is just another way to reference the image. Now, run the docker images command to see a list of our local images.
Path is wrong, use build: /etc/docker-selenium/StandaloneChromeDebug/
without .
If you try to cd to ./etc/docker-selenium/StandaloneChromeDebug/
, you will get an error.
version: "3.5"
services:
selenium-hub:
container_name: selenium-hub
build: /etc/docker-selenium/StandaloneChromeDebug/
volumes:
- /dev/shm:/dev/shm
ports:
- "4444:4444"
- "5900:5900"
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
Exapmle:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With