Skip to content

Commit 5e4eee1

Browse files
committed
Update the Dockerfile
1 parent 475785a commit 5e4eee1

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

Dockerfile

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ RUN apt-get update && apt-get install -y \
2323
libxfixes3 \
2424
libxkbcommon0 \
2525
libxrandr2 \
26-
xdg-utils \
2726
libu2f-udev \
28-
libvulkan1
27+
libvulkan1 \
28+
xdg-utils
2929

3030
#=================================
3131
# Install Bash Command Line Tools
3232
#=================================
3333
RUN apt-get -qy --no-install-recommends install \
34+
curl \
3435
sudo \
3536
unzip \
36-
wget \
37-
curl \
3837
vim \
38+
wget \
3939
xvfb \
4040
&& rm -rf /var/lib/apt/lists/*
4141

@@ -46,27 +46,13 @@ RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_am
4646
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
4747
RUN rm google-chrome-stable_current_amd64.deb
4848

49-
#=======================================
50-
# Install Python and Basic Python Tools
51-
#=======================================
52-
RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update
53-
RUN apt-get install -y python3 python3-pip python3-setuptools python3-dev python-distribute
49+
#================
50+
# Install Python
51+
#================
52+
RUN apt-get update -y
53+
RUN apt-get install -y python3 python3-pip python3-setuptools python3-dev
5454
RUN alias python=python3
5555
RUN echo "alias python=python3" >> ~/.bashrc
56-
57-
#===========================
58-
# Configure Virtual Display
59-
#===========================
60-
RUN set -e
61-
RUN echo "Starting X virtual framebuffer (Xvfb) in background..."
62-
RUN Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
63-
RUN export DISPLAY=:99
64-
RUN exec "$@"
65-
66-
#=======================
67-
# Update Python Version
68-
#=======================
69-
RUN apt-get update -y
7056
RUN apt-get -qy --no-install-recommends install python3.10
7157
RUN rm /usr/bin/python3
7258
RUN ln -s python3.10 /usr/bin/python3
@@ -77,6 +63,15 @@ RUN ln -s python3.10 /usr/bin/python3
7763
RUN export PYTHONIOENCODING=utf8
7864
RUN echo "export PYTHONIOENCODING=utf8" >> ~/.bashrc
7965

66+
#===========================
67+
# Configure Virtual Display
68+
#===========================
69+
RUN set -e
70+
RUN echo "Starting X virtual framebuffer (Xvfb) in background..."
71+
RUN Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
72+
RUN export DISPLAY=:99
73+
RUN exec "$@"
74+
8075
#=====================
8176
# Set up SeleniumBase
8277
#=====================
@@ -86,15 +81,19 @@ COPY examples /SeleniumBase/examples/
8681
COPY integrations /SeleniumBase/integrations/
8782
COPY requirements.txt /SeleniumBase/requirements.txt
8883
COPY setup.py /SeleniumBase/setup.py
84+
COPY MANIFEST.in /SeleniumBase/MANIFEST.in
85+
COPY pytest.ini /SeleniumBase/pytest.ini
86+
COPY setup.cfg /SeleniumBase/setup.cfg
87+
COPY virtualenv_install.sh /SeleniumBase/virtualenv_install.sh
8988
RUN find . -name '*.pyc' -delete
90-
RUN pip3 install --upgrade pip setuptools wheel
91-
RUN cd /SeleniumBase && ls && pip3 install -r requirements.txt --upgrade
92-
RUN cd /SeleniumBase && pip3 install .
89+
RUN pip install --upgrade pip setuptools wheel
90+
RUN cd /SeleniumBase && ls && pip install -r requirements.txt --upgrade
91+
RUN cd /SeleniumBase && pip install .
9392

9493
#=======================
9594
# Download chromedriver
9695
#=======================
97-
RUN sbase get chromedriver --path
96+
RUN seleniumbase get chromedriver --path
9897

9998
#==========================================
10099
# Create entrypoint and grab example tests

0 commit comments

Comments
 (0)