-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These debug images are not meant to be included in the official docker supported debug solution, they are merely a stop gap till #2 is resolved. Part of #3
- Loading branch information
Showing
12 changed files
with
301 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM selenium/node-chrome:2.44.0 | ||
#FROM selenium/node-*:2.44.0 Proper FROM attr will be applied throuh generate.sh | ||
MAINTAINER Selenium <[email protected]> | ||
|
||
USER root | ||
|
||
#===== | ||
# VNC | ||
#===== | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
x11vnc \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p ~/.vnc \ | ||
&& x11vnc -storepasswd secret ~/.vnc/passwd | ||
|
||
#================= | ||
# Locale settings | ||
#================= | ||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
RUN locale-gen en_US.UTF-8 \ | ||
&& dpkg-reconfigure --frontend noninteractive locales \ | ||
&& apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
language-pack-en \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#======= | ||
# Fonts | ||
#======= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
fonts-ipafont-gothic \ | ||
xfonts-100dpi \ | ||
xfonts-75dpi \ | ||
xfonts-cyrillic \ | ||
xfonts-scalable \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#========= | ||
# fluxbox | ||
# A fast, lightweight and responsive window manager | ||
#========= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
fluxbox \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#============================== | ||
# Scripts to run Selenium Node | ||
#============================== | ||
COPY entry_point.sh /opt/bin/entry_point.sh | ||
RUN chmod +x /opt/bin/entry_point.sh | ||
|
||
EXPOSE 5900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" | ||
|
||
if [ ! -e /opt/selenium/config.json ]; then | ||
echo No Selenium Node configuration file, the node-base image is not intended to be run directly. 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then | ||
echo Not linked with a running Hub container 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# TODO: Look into http://www.seleniumhq.org/docs/05_selenium_rc.jsp#browser-side-logs | ||
|
||
sudo -E -i -u seluser \ | ||
DISPLAY=$DISPLAY \ | ||
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \ | ||
java -jar /opt/selenium/selenium-server-standalone.jar \ | ||
-role node \ | ||
-hub http://hub:4444/grid/register \ | ||
-nodeConfig /opt/selenium/config.json \ | ||
| tee "/tmp/sel-node.log" & | ||
sleep 0.5 | ||
|
||
fluxbox -display $DISPLAY & | ||
|
||
x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#FROM selenium/node-*:2.44.0 Proper FROM attr will be applied throuh generate.sh | ||
MAINTAINER Selenium <[email protected]> | ||
|
||
USER root | ||
|
||
#===== | ||
# VNC | ||
#===== | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
x11vnc \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p ~/.vnc \ | ||
&& x11vnc -storepasswd secret ~/.vnc/passwd | ||
|
||
#================= | ||
# Locale settings | ||
#================= | ||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
RUN locale-gen en_US.UTF-8 \ | ||
&& dpkg-reconfigure --frontend noninteractive locales \ | ||
&& apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
language-pack-en \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#======= | ||
# Fonts | ||
#======= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
fonts-ipafont-gothic \ | ||
xfonts-100dpi \ | ||
xfonts-75dpi \ | ||
xfonts-cyrillic \ | ||
xfonts-scalable \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#========= | ||
# fluxbox | ||
# A fast, lightweight and responsive window manager | ||
#========= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
fluxbox \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#============================== | ||
# Scripts to run Selenium Node | ||
#============================== | ||
COPY entry_point.sh /opt/bin/entry_point.sh | ||
RUN chmod +x /opt/bin/entry_point.sh | ||
|
||
EXPOSE 5900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
| tee "/tmp/sel-node.log" & | ||
sleep 0.5 | ||
|
||
fluxbox -display $DISPLAY & | ||
|
||
x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
FOLDER=../$1 | ||
BASE=$2 | ||
VERSION=$3 | ||
|
||
rm -rf $FOLDER | ||
mkdir -p $FOLDER | ||
|
||
echo FROM selenium/$BASE:$VERSION > $FOLDER/Dockerfile | ||
cat ./Dockerfile >> $FOLDER/Dockerfile | ||
|
||
sed '${s/$/ \\/;}' ../NodeBase/entry_point.sh > $FOLDER/entry_point.sh | ||
|
||
sed 's/^xvfb-run/sudo -E -i -u seluser \\\ | ||
DISPLAY=$DISPLAY \\\ | ||
xvfb-run/' $FOLDER/entry_point.sh > $FOLDER/entry_point.sh.tmp | ||
mv $FOLDER/entry_point.sh.tmp $FOLDER/entry_point.sh | ||
|
||
cat ./debug-script.sh >> $FOLDER/entry_point.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM selenium/node-firefox:2.44.0 | ||
#FROM selenium/node-*:2.44.0 Proper FROM attr will be applied throuh generate.sh | ||
MAINTAINER Selenium <[email protected]> | ||
|
||
USER root | ||
|
||
#===== | ||
# VNC | ||
#===== | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
x11vnc \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p ~/.vnc \ | ||
&& x11vnc -storepasswd secret ~/.vnc/passwd | ||
|
||
#================= | ||
# Locale settings | ||
#================= | ||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
RUN locale-gen en_US.UTF-8 \ | ||
&& dpkg-reconfigure --frontend noninteractive locales \ | ||
&& apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
language-pack-en \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#======= | ||
# Fonts | ||
#======= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
fonts-ipafont-gothic \ | ||
xfonts-100dpi \ | ||
xfonts-75dpi \ | ||
xfonts-cyrillic \ | ||
xfonts-scalable \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#========= | ||
# fluxbox | ||
# A fast, lightweight and responsive window manager | ||
#========= | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install \ | ||
fluxbox \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
#============================== | ||
# Scripts to run Selenium Node | ||
#============================== | ||
COPY entry_point.sh /opt/bin/entry_point.sh | ||
RUN chmod +x /opt/bin/entry_point.sh | ||
|
||
EXPOSE 5900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH" | ||
|
||
if [ ! -e /opt/selenium/config.json ]; then | ||
echo No Selenium Node configuration file, the node-base image is not intended to be run directly. 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then | ||
echo Not linked with a running Hub container 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# TODO: Look into http://www.seleniumhq.org/docs/05_selenium_rc.jsp#browser-side-logs | ||
|
||
sudo -E -i -u seluser \ | ||
DISPLAY=$DISPLAY \ | ||
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \ | ||
java -jar /opt/selenium/selenium-server-standalone.jar \ | ||
-role node \ | ||
-hub http://hub:4444/grid/register \ | ||
-nodeConfig /opt/selenium/config.json \ | ||
| tee "/tmp/sel-node.log" & | ||
sleep 0.5 | ||
|
||
fluxbox -display $DISPLAY & | ||
|
||
x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters