I m not sure if I well understood your question, but I think you want to have 1 docker with Google Chrome, Google Driver and python3 on the same docker right ?

I didn't know about Google Chrome on a docker, just about selenium web driver, but that won't change the answer.

If you know how to install this with command lines, you cant make a FROM ubuntu:latest and then add lines like : RUN apt-get update;apt-get install "your_package". (the apt-get update is very important if you want to install things).

Your Dockerfile can look like this:

FROM ubutu:latest

RUN apt-get update;apt-get install iputils-ping -y; #(that s an example)

Then you ll just have to install python like on your computer with the command apt install python3.10 for example.

Hope I helped you ;)

Answer from Tanguy Bron on Stack Overflow
🌐
Docker Hub
hub.docker.com › _ › python
python - Official Image | Docker Hub
When using this image pip install will work if a suitable built distribution is available for the Python distribution package being installed. pip install may fail when installing a Python distribution package from a source distribution. This image does not contain the Debian packages required to compile extension modules written in other languages. Possible solutions if a pip install fails include: Use this image and install any required Debian packages before running pip install.
🌐
Python⇒Speed
pythonspeed.com › articles › base-image-python-docker-images
The best Docker base image for your Python application (February 2026)
February 4, 2026 - This lacks the common packages’ layers, and so the image itself is much smaller, but if you use many other “official” Docker images the overall disk usage will be somewhat higher.
Discussions

What's the best docker image to have a python environment so I could run my scripts on there instead of on Windows? I'd prefer not to use a VM.
Doesn’t docker for windows run containers in a vm More on reddit.com
🌐 r/homelab
21
2
October 23, 2023
Any docker image with python and pip preinstalled?
Is there any docker image available which comes with pre installed python and pip. I am quite new to docker. More on forums.docker.com
🌐 forums.docker.com
6
0
December 28, 2017
Optimizing Docker Images for Python Production Services
Get rid of poetry for uv, you will reduce you build speeds by quite a bit since poetries dependency resolver can be pretty slow in many cases. Also stop using virtualenvs inside of the container. They just waste space since the official Python images already have a dedicated "non-system" Python pre-installed in /usr/local (and it should not matter if you used the system Python really since the container should be single purpose). More on reddit.com
🌐 r/devops
7
14
July 22, 2024
What to use as base image?
As others have pointed out, I would run your app and Nginx in two separate containers. I would also use something like gunicorn to run your app in production. My favorite Python Docker images are the Python Slim images (e.g., python:3.7-slim). I find them to be a good tradeoff between small size and required packages. The base image is Debian Linux. Since you are interested in running in production you also want to be sure you are not running your Python app as root. Here is a sample Dockerfile that I use to accomplish this which you can use as a starting point (note: my app is in a folder called ./service): FROM python:3.7-slim # Get the version from the build arguments: # --build-arg VERSION=1.2.0 ARG VERSION ENV VERSION=$VERSION # Create a regular user for production RUN groupadd -g 1001 prod && \ useradd -r -u 1001 -g prod prod # Set up the development environment WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install -U pip && \ pip install --no-cache-dir -r requirements.txt # Copy the application files COPY config.py manage.py ./ COPY service ./service # Expose any ports the app is expecting in the environment ENV PORT 5000 EXPOSE $PORT # Become a regular user that owns the app folder RUN chown -R prod:prod /app USER prod # Run the service with gunicorn ENV GUNICORN_BIND 0.0.0.0:$PORT CMD ["gunicorn", "--workers=4", "--log-level=info", "service:app"] Note that I have included a build argument call VERSION. I use this in my logs so that I know what version of the app is running. You would add it to the build it like this: docker-compose build --build-arg VERSION=1.2.0 Then just pull VERSION out of the environment and display it in the log messages at startup. Don't forget to add lots of log messages in your code. When you're in production, your logs are the only thing to tell you what's going on when nothing is going right. ;-) More on reddit.com
🌐 r/docker
17
2
August 15, 2020
People also ask

What is the official Python Docker image, and where can I find it?
The official repository is library/python on Docker Hub. There are different variants available, like python:3.12, python:3.12-slim, and python:3.11. You should pick a specific version for reproducible builds.
🌐
cyberpanel.net
cyberpanel.net › blog › python-docker-image
Python Docker Image: Proven Hacks for Best Builds in 2026!
What is one of the smallest Docker Python images?
Alpine or scratch-based distroless images are the smallest. But the smallest is not always best for compatibility.
🌐
cyberpanel.net
cyberpanel.net › blog › python-docker-image
Python Docker Image: Proven Hacks for Best Builds in 2026!
What should I use between slim and alpine for Python?
Use slim if you rely on many wheels (NumPy, cryptography, etc.). Alpine’s musl libc can break prebuilt wheels and slow compiles. Alpine is fine for very small, pure-Python apps.
🌐
cyberpanel.net
cyberpanel.net › blog › python-docker-image
Python Docker Image: Proven Hacks for Best Builds in 2026!
🌐
Reddit
reddit.com › r/homelab › what's the best docker image to have a python environment so i could run my scripts on there instead of on windows? i'd prefer not to use a vm.
r/homelab on Reddit: What's the best docker image to have a python environment so I could run my scripts on there instead of on Windows? I'd prefer not to use a VM.
October 23, 2023 - I usually just grab a base Debian container and install the version of Python I want on it via my Dockerfile. ... Personally I use the jupyter images. Not as tiny as some, but a nice little miniconda+ubuntu distribution that is easy to extend ...
🌐
Docker
hub.docker.com › search
Explore Docker's Container Image Repository | Docker Hub
ActiveState's customizable, low-to-no vulnerability container image for python.
🌐
GitHub
github.com › docker-library › python
GitHub - docker-library/python: Docker Official Image packaging for Python · GitHub
This is the Git repo of the Docker "Official Image" for python (not to be confused with any official python image provided by python upstream). See the Docker Hub page for the full readme on how to use this Docker image and for information regarding ...
Starred by 2.7K users
Forked by 1.1K users
Languages   Dockerfile 50.3% | Shell 49.7%
Find elsewhere
🌐
Docker
docker.com › blog › containerized-python-development-part-1
Containerized Python Development - Part 1 | Docker
May 24, 2024 - These images are usually based on the alpine distribution and are tagged accordingly. However, for Python applications, the slim variant of the official Docker Python image works well for most cases (eg.
🌐
Docker
docker-py.readthedocs.io › en › stable › images.html
Images — Docker SDK for Python 7.1.0 documentation
Build an image and return it. Similar to the docker build command. Either path or fileobj must be set. If you already have a tar file for the Docker build context (including a Dockerfile), pass a readable file-like object to fileobj and also pass custom_context=True. If the stream is also compressed, set encoding to the correct value (e.g gzip). If you want to get the raw output of the build, use ...
🌐
Docker
hub.docker.com › r › bitnami › python
bitnami/python - Docker Image
docker run --name python REGISTRY_NAME/bitnami/python:latest Copy · Note: You need to substitute the REGISTRY_NAME placeholder with a reference to your container registry. This asset is available in two flavors: Standard and Minimal; designed to address different use cases and operational needs. The standard images are full-featured, production-ready containers built on top of secure base operating systems.
🌐
CyberPanel
cyberpanel.net › blog › python-docker-image
Python Docker Image: Proven Hacks for Best Builds in 2026!
January 16, 2026 - You have to run this command to install and pull the Python Docker image on Ubuntu: # If Docker is installed: docker pull python:3.12-slim docker run -it --rm python:3.12-slim python --version · If you need Docker first, install the Docker ...
🌐
JFrog
jfrog.com › home › python base image
How to Choose a Docker Base Image for Python
November 25, 2025 - Optimizing base images involves several strategies: using a minimal base image, leveraging multi-stage builds to separate build and runtime dependencies, pinning specific version tags (e.g., python:3.12-slim), and consolidating RUN instructions in the Dockerfile.
🌐
Docker Hub
hub.docker.com › r › microsoft › devcontainers-python
microsoft/devcontainers-python - Docker Image
You can directly reference pre-built versions of Dockerfile by using the image property in .devcontainer/devcontainer.json or updating the FROM statement in your own Dockerfile with one of the following: ... mcr.microsoft.com/devcontainers/python:3.9 (or 3.9-trixie, 3.9-bookworm, 3.9-bullseye to pin to an OS version)
🌐
Docker
docs.docker.com › guides › python › containerize your app
Containerize your app | Docker Docs
You can use the Python Docker Official Image, or a Docker Hardened Image (DHI). Docker Hardened Images (DHIs) are minimal, secure, and production-ready base images maintained by Docker.
🌐
Django Stars
djangostars.com › home › docker tutorial: using docker with python
Python Docker Tutorial: How to Use Docker with Python | Django Stars
September 11, 2025 - Only you can decide which base image to use, but you can get the maximum benefit by using one basic image for all images, because in this case the cache will be used more effectively.
🌐
Snyk
snyk.io › blog › best-practices-containerizing-python-docker
Best practices for containerizing Python applications with Docker | Snyk
November 11, 2021 - Since we didn't add a specific tag, it defaulted to the :latest version of that base image, which happens to be 3.10 if we look on the official image page in Docker Hub · Since we would like to control which versions of Python we are containerizing, we should always provide that version information in the Dockerfile. So since I want to use the version 3.10 of Python, I'd just have to add the :3.10 tag to my Dockerfile, right?
🌐
Python⇒Speed
pythonspeed.com › articles › official-python-docker-image
A deep dive into the “official” Docker image for Python
January 30, 2026 - At the time of writing, the last release of Python 3.5 was in November 2019, but the Docker image for python:3.5-slim-buster includes pip from August 2020. This is (usually) a good thing, it means you get the latest bug fixes, performance ...
🌐
Visual Studio Code
code.visualstudio.com › docs › containers › quickstart-python
Python in a container
November 3, 2021 - The Containers: Add Docker Files to Workspace... command automatically creates a Docker launch configuration to build and run your container in debug mode. To debug your Python app container: Navigate to the file that contains your app's startup code, and set a breakpoint. Navigate to Run and Debug and select Containers: Python - General, Containers: Python - Django, or Containers: Python - Flask, as appropriate. Start debugging using the F5 key. The container image builds.
🌐
Workhelixapp
workhelixapp.com › docker › docker_py_img
Docker Python Images - Wikihelix
When choosing a Python base image for your Docker container, consider the following factors: Image size: Smaller images, like slim and alpine, result in faster build times and reduced storage usage. This is important for lightweight applications and microservices.