Skip to content

Commit 1afa44c

Browse files
committed
Fix the Docker integration
1 parent 18539c9 commit 1afa44c

File tree

3 files changed

+4
-29
lines changed

3 files changed

+4
-29
lines changed

Dockerfile

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,6 @@ RUN apt-get -qy --no-install-recommends install \
2020
xvfb \
2121
&& rm -rf /var/lib/apt/lists/*
2222

23-
#========================================
24-
# Add normal user with passwordless sudo
25-
#========================================
26-
#RUN sudo useradd seluser --shell /bin/bash --create-home \
27-
# && sudo usermod -a -G sudo seluser \
28-
# && echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
29-
30-
#======================
31-
# Install Chromedriver
32-
#======================
33-
RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && \
34-
mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION && \
35-
curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && \
36-
unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION && \
37-
rm /tmp/chromedriver_linux64.zip && \
38-
chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver && \
39-
ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver
40-
4123
#================
4224
# Install Chrome
4325
#================
@@ -67,15 +49,6 @@ RUN apt-get -qy --no-install-recommends install \
6749
&& ln -s /opt/firefox/firefox /usr/bin/firefox \
6850
&& rm -f /tmp/firefox-esr.tar.bz2
6951

70-
#===================
71-
# Install PhantomJS
72-
#===================
73-
# RUN cd /usr/local/share && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
74-
# RUN cd /usr/local/share && tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
75-
# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
76-
# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
77-
# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
78-
7952
#===========================
8053
# Configure Virtual Display
8154
#===========================
@@ -97,6 +70,8 @@ RUN pip install --upgrade pip
9770
RUN pip install --upgrade setuptools
9871
RUN cd /SeleniumBase && ls && pip install -r requirements.txt --upgrade
9972
RUN cd /SeleniumBase && python setup.py develop
73+
RUN seleniumbase install chromedriver
74+
RUN seleniumbase install geckodriver
10075

10176
#==========================================
10277
# Create entrypoint and grab example tests

integrations/docker/run_docker_test_in_chrome.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33
# Run example test from inside Docker image
44
echo "Running example SeleniumBase test from Docker with headless Chrome..."
5-
cd /SeleniumBase/examples/ && nosetests my_first_test.py --config=docker_config.cfg --browser=chrome --headless
5+
cd /SeleniumBase/examples/ && pytest my_first_test.py --browser=chrome --headless
66
exec "$@"

integrations/docker/run_docker_test_in_firefox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33
# Run example test from inside Docker image
44
echo "Running example SeleniumBase test from Docker with headless Firefox..."
5-
cd /SeleniumBase/examples/ && nosetests my_first_test.py --config=docker_config.cfg --browser=firefox --headless
5+
cd /SeleniumBase/examples/ && pytest my_first_test.py --browser=firefox --headless
66
exec "$@"

0 commit comments

Comments
 (0)