I want to Dockerise my django application. But one of the requirements is playwright which requires chrome-headless browser to be installed on on server.
So if I have FROM python:3.13
in my Dockerfile how/where does chrome browser get installed to ?
One of the requirement of what? Your Django application? If so, then you need to install chrome-headless in your container.
Depending upon how “moveable” you want this container to be, you might be able to install chrome-headless on the host, and then mount those directories in the container. Looking at the current google chrome .deb
file, you might be able to get away with only mounting /opt/google
, but that obviously needs to be tested. (You would need to ensure that it is installed to the same directories on every host that needs to use it, or else modify your docker run (or docker compose file) for those hosts.)
In either case, if it’s your Django application that needs it, then it needs to be “visible” to the application.
Yes, my Django application requires playwright for which pip install playwright==1.50.0
alone will not suffice as it has to be followed by playwright install
RUN pip install --no-cache-dir -r requirements.txt
RUN playwright install
But how can I find out at which locations does playwright write the the OS filesystem ?