Sign inSign up

supersqa/jenkins-firefox

By supersqa

•Updated about 1 year ago

Jenkins with Firefox pre-installed. Multi-arch (amd64, arm64). Great for UI test automation demos.

Image
Developer tools
0

495

supersqa/jenkins-firefox repository overview

Docker Pulls Docker Image Size GitHub Stars

⁠Jenkins Controller with Firefox & Selenium

This Docker image provides a full-featured Jenkins Controller environment based on the official LTS release, enhanced with Firefox, Python, and Selenium to enable seamless execution of browser-based UI automation jobs.

Source Code on GitHub: https://github.com/supersqa1/jenkins-firefox-docker⁠


⁠🚀 Quick Start: Run as a Jenkins Controller

To run this image as a proper Jenkins controller, you must mount a volume to persist your Jenkins data (jenkins_home). This ensures your jobs, plugins, and configurations are saved even if the container is removed.

The recommended approach is to use a bind mount, which maps a directory from your local machine into the container.

⁠Mac/Linux
docker run -p 8080:8080 -p 50000:50000 -v $(pwd)/jenkins_data:/var/jenkins_home supersqa/jenkins-firefox
⁠Windows
docker run -p 8080:8080 -p 50000:50000 -v %cd%\jenkins_data:/var/jenkins_home supersqa/jenkins-firefox
⁠Breakdown of the command:
  • -p 8080:8080: Maps the Jenkins web UI port to your host machine.
  • -p 50000:50000: Maps the agent communication port.
  • -v $(pwd)/jenkins_data:/var/jenkins_home (Mac/Linux): Creates a directory named jenkins_data in your current location and maps it to the Jenkins home directory inside the container. This is how your data is persisted.
  • -v %cd%\jenkins_data:/var/jenkins_home (Windows): Maps a directory named jenkins_data in your current directory to the Jenkins home directory inside the container, ensuring data persistence.
  • supersqa/jenkins-firefox: The name of the Docker image.

After running the command, access Jenkins at http://localhost:8080.

⁠Alternative: Using a Named Volume

If you prefer not to manage a local folder directly, you can use a Docker-managed named volume. Docker will handle the storage location for you.

docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home supersqa/jenkins-firefox

⁠✨ Running Standalone Selenium Scripts

While the primary purpose of this image is to serve as a Jenkins controller, you can also use it to run standalone Python Selenium scripts for testing or validation. This is useful for verifying that your automation scripts work correctly within the container's environment.

Note: This method runs a single script and then exits. It does not start the Jenkins service.

# General command structure
docker run -it --rm --platform linux/amd64 -v /path/to/your/scripts:/scripts supersqa/jenkins-firefox /myenv/bin/python3 /scripts/your_script.py

# Example using the included scripts
docker run -it --rm --platform linux/amd64 supersqa/jenkins-firefox /myenv/bin/python3 /selenium_examples/selenium_firefox_example.py

⁠🔧 Key Features

  • Jenkins Controller: Based on the official jenkins/jenkins:lts-jdk21 image.
  • Browser Included: Comes with Firefox pre-installed for UI testing.
  • Test Automation Ready: Includes Python 3, a virtual environment, and Selenium.
  • Multi-Platform: Built for linux/amd64 (Intel/AMD). Note: ARM compatibility for UI tests may vary.

⁠🏗️ Building from Source

If you need to customize the image (e.g., add more tools or plugins), you can build it from the Dockerfile.

  1. Clone the GitHub repository⁠.
  2. Run the build command from the repository's root directory:
docker build -t my-custom-jenkins-ff .

⁠About SuperSQA

SuperSQA Logo

SuperSQA is your source for learning QA automation and becoming an SDET. Find tutorials on engineering, pipelines, coding, and testing on our platforms.


⁠Platform-Specific Instructions

⁠Mac
  • Ensure Docker Desktop is installed and running.
  • Use the following command to start the Jenkins container:
    docker run -p 8080:8080 -p 50000:50000 -v $(pwd)/jenkins_data:/var/jenkins_home supersqa/jenkins-firefox
    
⁠Windows
  • Ensure Docker Desktop is installed and running.
  • Use the following command in Command Prompt:
    docker run -p 8080:8080 -p 50000:50000 -v %cd%\jenkins_data:/var/jenkins_home supersqa/jenkins-firefox
    
⁠Linux
  • Ensure Docker is installed and running.
  • Use the following command to start the Jenkins container:
    docker run -p 8080:8080 -p 50000:50000 -v $(pwd)/jenkins_data:/var/jenkins_home supersqa/jenkins-firefox
    

⁠4c4 Consistency and Cross-Referencing

For more detailed platform-specific build and test scripts, refer to the main README.md⁠ file.


⁠4c4 Visual Enhancements

Consider adding diagrams or flowcharts to illustrate the setup process or architecture. This can be done using tools like Mermaid⁠ for markdown-based diagrams.


⁠4c4 User Feedback

We welcome your feedback and contributions! Feel free to open issues or submit pull requests on our GitHub repository⁠.

Tag summary

Content type

Image

Digest

sha256:8b48bd7e8…

Size

763.1 MB

Last updated

about 1 year ago

docker pull supersqa/jenkins-firefox