Create the Dockerfile for the Test Container
Understand how to write a Dockerfile that sets up a container for running Selenium tests with Java and Maven. Learn how to base your image on selenium/node-chrome, install necessary tools, and configure the test execution via command scripts.
We'll cover the following...
We'll cover the following...
The Docker container will include everything that is needed for running the Selenium tests:
- Operating system (Linux)
- Automation code
- Chrome browser
- JAVA JDK
- Maven
The container is going to be created from a Docker image, which is generated from a text file named Dockerfile.
What is a Dockerfile?
Dockerfile is a text file that describes how the container image is created.
It includes multiple commands (one per line) and is located in the project root folder.
The Selenium tests image is created in a few steps: