-
-
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.
- Loading branch information
Showing
7 changed files
with
174 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. | ||
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
FROM selenium/node-base:3.0.1-fermium | ||
MAINTAINER Selenium <[email protected]> | ||
|
||
USER root | ||
|
||
#============== | ||
# PhantomJS | ||
#============== | ||
RUN apt-get update -y | ||
RUN apt-get install bzip2 libfreetype6 libfontconfig1 -y | ||
RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | ||
RUN tar -xvjf phantomjs-1.9.8-linux-x86_64.tar.bz2 && rm phantomjs-1.9.8-linux-x86_64.tar.bz2 | ||
RUN mv /phantomjs-1.9.8-linux-x86_64 /usr/local/phantomjs-1.9.8-linux-x86_64 | ||
RUN ln -s /usr/local/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs | ||
|
||
#============================== | ||
# Scripts to run Selenium Node | ||
#============================== | ||
COPY entry_point.sh /opt/bin/entry_point.sh | ||
RUN chmod +x /opt/bin/entry_point.sh | ||
|
||
#============================ | ||
# Some configuration options | ||
#============================ | ||
ENV SCREEN_WIDTH 1360 | ||
ENV SCREEN_HEIGHT 1020 | ||
ENV SCREEN_DEPTH 24 | ||
ENV DISPLAY :99.0 | ||
|
||
USER seluser | ||
|
||
CMD ["/opt/bin/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,31 @@ | ||
MAINTAINER Selenium <[email protected]> | ||
|
||
USER root | ||
|
||
#============== | ||
# PhantomJS | ||
#============== | ||
RUN apt-get update -y | ||
RUN apt-get install bzip2 libfreetype6 libfontconfig1 -y | ||
RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | ||
RUN tar -xvjf phantomjs-1.9.8-linux-x86_64.tar.bz2 && rm phantomjs-1.9.8-linux-x86_64.tar.bz2 | ||
RUN mv /phantomjs-1.9.8-linux-x86_64 /usr/local/phantomjs-1.9.8-linux-x86_64 | ||
RUN ln -s /usr/local/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs | ||
|
||
#============================== | ||
# Scripts to run Selenium Node | ||
#============================== | ||
COPY entry_point.sh /opt/bin/entry_point.sh | ||
RUN chmod +x /opt/bin/entry_point.sh | ||
|
||
#============================ | ||
# Some configuration options | ||
#============================ | ||
ENV SCREEN_WIDTH 1360 | ||
ENV SCREEN_HEIGHT 1020 | ||
ENV SCREEN_DEPTH 24 | ||
ENV DISPLAY :99.0 | ||
|
||
USER seluser | ||
|
||
CMD ["/opt/bin/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 @@ | ||
Selenium Node configured to run PhantomJS. |
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,54 @@ | ||
# Selenium Grid Node - PhantomJS | ||
|
||
Selenium Node configured to run PhantomJS. | ||
|
||
## Dockerfile | ||
|
||
[`selenium/node-phantomjs` Dockerfile](https://github.com/SeleniumHQ/docker-selenium/blob/master/NodePhantomJS/Dockerfile) | ||
|
||
## How to use this image | ||
|
||
First, you will need a Selenium Grid Hub that the Node will connect to. | ||
|
||
``` | ||
$ docker run -d -P --name selenium-hub selenium/hub | ||
``` | ||
|
||
Once the hub is up and running will want to launch nodes that can run tests. You can run as many nodes as you wish. | ||
|
||
``` | ||
$ docker run -d --link selenium-hub:hub selenium/node-phantomjs | ||
``` | ||
|
||
## What is Selenium? | ||
_Selenium automates browsers._ That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well. | ||
|
||
Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks. | ||
|
||
See the Selenium [site](http://docs.seleniumhq.org/) for documation on usage within your test code. | ||
|
||
## License | ||
|
||
View [license information](https://github.com/SeleniumHQ/docker-selenium/blob/master/LICENSE.md) for the software contained in this image. | ||
|
||
## Getting Help | ||
|
||
### User Group | ||
|
||
The first place where people ask for help about Selenium is the [Official User Group](https://groups.google.com/forum/#!forum/selenium-users). Here, you'll find that most of the time, someone already found the problem you are facing right now, and usually reached the solution for which you are looking. | ||
|
||
_Note: Please make sure to search the group before asking for something. Your question likely won't get answered if it was previously answered in another discussion!_ | ||
|
||
### Chat Room | ||
|
||
The best place to ask for help is the user group (because they also keep the information accessible for others to read in the future). However, if you have a very important (or too simple) issue that needs a solution ASAP, you can always enter the IRC chat room. You might just find someone ready to help on `#selenium` at [Freenode](https://freenode.net/). | ||
|
||
### Issues | ||
|
||
If you have any problems with or questions about this image, please contact us through a [Github issue](https://github.com/SeleniumHQ/docker-selenium/issues). If you have any problems with or questions about Selenium, please contact us through Selenium's [Bug Tracker](https://code.google.com/p/selenium/issues/list). | ||
|
||
## Contributing | ||
|
||
There are many ways to [contribute](http://docs.seleniumhq.org/about/getting-involved.jsp) whether by answering user questions, additional docs, or pull request we look forward to hearing from you. | ||
|
||
If you do supply a patch we will need you to [sign the CLA](https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dFFjXzBzM1VwekFlOWFWMjFFRjJMRFE6MQ#gid=0). We are part of [SFC](http://www.sfconservancy.org/) |
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,23 @@ | ||
#!/bin/bash | ||
|
||
source /opt/bin/functions.sh | ||
|
||
if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then | ||
echo Not linked with a running Hub container 1>&2 | ||
exit 1 | ||
fi | ||
|
||
function shutdown { | ||
kill -s SIGTERM $NODE_PID | ||
wait $NODE_PID | ||
} | ||
|
||
if [ -z "$IP" ]; then | ||
IP="$(hostname -i)" | ||
fi | ||
|
||
|
||
phantomjs --webdriver=$IP:4444 ${PHANTOMJS_OPTS} --webdriver-selenium-grid-hub=http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT | ||
|
||
trap shutdown SIGTERM SIGINT | ||
wait $NODE_PID |
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,9 @@ | ||
#!/bin/bash | ||
VERSION=$1 | ||
|
||
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" > ./Dockerfile | ||
echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile | ||
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile | ||
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile | ||
echo FROM selenium/node-base:$VERSION >> ./Dockerfile | ||
cat ./Dockerfile.txt >> ./Dockerfile |