I need to install playwright inside of docker. This is my dockerfile.
FROM python:3.9
EXPOSE 8000
WORKDIR /fastanalytics
COPY /requirements.txt /fastanalytics/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /fastanalytics/requirements.txt
RUN playwright install
RUN playwright install-deps
RUN apt-get update && apt-get upgrade -y
But when I am installing I got the below error. I tried installing everything in the error message but it didn't help.
E: Package 'ttf-ubuntu-font-family' has no installation candidate
E: Unable to locate package libenchant1c2a
E: Unable to locate package libicu66
E: Package 'libjpeg-turbo8' has no installation candidate

Microsoft released a python docker image for Playwright
Dockerfile
# Build Environment: Playwright
FROM mcr.microsoft.com/playwright/python:v1.21.0-focal
# Add python script to Docker
COPY index.py /
# Run Python script
CMD [ "python", "index.py" ]
Check Playwright - Docker docs for the latest playwright version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With