mercredi 12 août 2020

Docker Image: install Chrome, Chrome Driver and Selenium on CentOS 7

I have the following docker image on my VM:

FROM centos:7.5.1804

# Upgrade, install Python, install a bunch of other important dev libraries.
RUN yum install -y expat \
               expat-devel \
               freetype \
               freetype-devel \
               gcc \
               glx-utils \
               libpng-devel \
               libXt \
               llvm \
               llvm-devel \
               mesa-libGL \
               mesa-libGL-devel \
               mesa-libGLU \
               openmpi \
               postgresql-devel \
               python3 \
               python3-devel \
               python3-setuptools \
               python3-tkinter \
               zlib \
               zlib-devel \
               vim && \
    yum clean all

COPY deploy/requirements3.txt /requirements.txt
COPY deploy/static/ /static/

RUN pip3 install -r requirements.txt && \
    rm -rf /tmp /var/tmp /var/cache/* /root/.cache/* /requirements.txt

WORKDIR /bramble
COPY . /bramble
RUN python3 setup.py install

I need add code to download Chrome, CromeDriver for CentOS 7 and install Selenium on my VM so I can open an external website in a self contained browser and test the UI. I don't know how to do it. Can you help?

Aucun commentaire:

Enregistrer un commentaire