4

I am using this Dockerfile to build my package:

FROM python:3.9

MAINTAINER jiangxiaoqiang ([email protected])

ENV LANG=en_US.UTF-8 \
    LC_ALL=en_US.UTF-8 \
    TZ=Asia/Shanghai

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone \
    && mkdir -p /root/pydolphin \
    && apt-get update \
    && apt-get install ffmpeg chromium-chromedriver libsm6 libxext6 vim -y


ADD dolphin /root/pydolphin/dolphin
ADD requirements-pip.txt /root/pydolphin/
ADD schedulespider.py /root/pydolphin/
ADD docker-start-app.sh /root/pydolphin/
ADD cert_check_trigger.py /root/pydolphin/

RUN pip3 install -r /root/pydolphin/requirements-pip.txt
WORKDIR /root/pydolphin/
ENTRYPOINT exec /root/pydolphin/docker-start-app.sh

but shows this error:

Unable to locate package chromium-chromedriver

what should I do to make it could install chromium-chromedriver?

2
  • 1
    To be able to install chromium-chromedriver you would need to use ubuntu(-based) image, not debian(-based).
    – jabbson
    Commented Nov 28, 2021 at 3:56
  • 7
    Not sure if this is what you need, in debian I see there is a chromium-driver, you want to try that one.
    – jabbson
    Commented Nov 28, 2021 at 4:06

1 Answer 1

6

As pointed out by @jabbson , you need to install chromium-driver

The official Python Docker image is based on Debian (reference), while chromium-chromedriver is a Ubuntu package. They both fulfill the same need (Browser automation)

Not the answer you're looking for? Browse other questions tagged or ask your own question.