Python base with Selenium and Chrome
350
This Docker image is built on top of the official python:3.11.4 image, designed for applications requiring Python 3.11 with additional support for headless Chrome and ChromeDriver. It is ideal for running web automation, scraping tasks, or browser-based testing within a lightweight, Linux-based container environment.
libgtk-4-1, libnss3, and xdg-utils to support headless browser operations.python:3.11.4, providing the Python runtime and toolchain.apt-get.Build the Image:
docker build -t selenium_python_chrome .
Run a Container: Pass your Python script and its dependencies via mounted volumes or during runtime:
docker run -e SCRIPT_NAME=my_script.py -v $(pwd):/app selenium_python_chrome
Requirements File: Ensure you have a requirements.txt file in the /app directory to automatically install dependencies before running your script.
SCRIPT_NAME: Specify the Python script to execute (e.g., my_script.py). Default entry point automatically installs dependencies and runs the script.
You can extend this image by copying your project files and additional dependencies:
FROM selenium_python_chrome
COPY . /app
This will bundle your application directly into the image for easy deployment.
Content type
Image
Digest
sha256:1e1254f85…
Size
649.9 MB
Last updated
almost 2 years ago
docker pull pak00329/selenium_python_chrome