From caf47dd436f6cafed2b4ac35396ed77113c59aba Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 28 Nov 2017 17:50:52 +0100 Subject: [PATCH] Removing PhantomJS from docker-selenium images #583 --- .github/ISSUE_TEMPLATE.md | 2 -- Makefile | 24 +-------------- NodePhantomJS/Dockerfile | 37 ----------------------- NodePhantomJS/Dockerfile.txt | 30 ------------------- NodePhantomJS/README-short.txt | 1 - NodePhantomJS/README.md | 54 ---------------------------------- NodePhantomJS/entry_point.sh | 23 --------------- NodePhantomJS/generate.sh | 13 -------- README.md | 9 ------ tests/test.py | 6 ---- 10 files changed, 1 insertion(+), 198 deletions(-) delete mode 100644 NodePhantomJS/Dockerfile delete mode 100644 NodePhantomJS/Dockerfile.txt delete mode 100644 NodePhantomJS/README-short.txt delete mode 100644 NodePhantomJS/README.md delete mode 100644 NodePhantomJS/entry_point.sh delete mode 100755 NodePhantomJS/generate.sh diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index c64d4a78e8..bcb7083922 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -17,8 +17,6 @@ https://sites.google.com/a/chromium.org/chromedriver/help If the issue is with Firefox GeckoDriver (aka Marionette) consider logging an issue with Mozilla: https://bugzilla.mozilla.org/buglist.cgi?product=Testing&component=Marionette -If the issue is with PhantomJS consider logging an issue with Ghostdriver: -https://github.com/detro/ghostdriver --> ## Expected Behavior - diff --git a/Makefile b/Makefile index 539a4927d1..5b5fe61c4f 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,13 @@ MAJOR := $(word 1,$(subst ., ,$(VERSION))) MINOR := $(word 2,$(subst ., ,$(VERSION))) MAJOR_MINOR_PATCH := $(word 1,$(subst -, ,$(VERSION))) -all: hub chrome firefox phantomjs chrome_debug firefox_debug standalone_chrome standalone_firefox standalone_chrome_debug standalone_firefox_debug +all: hub chrome firefox chrome_debug firefox_debug standalone_chrome standalone_firefox standalone_chrome_debug standalone_firefox_debug generate_all: \ generate_hub \ generate_nodebase \ generate_chrome \ generate_firefox \ - generate_phantomjs \ generate_chrome_debug \ generate_firefox_debug \ generate_standalone_firefox \ @@ -90,19 +89,12 @@ generate_firefox_debug: firefox_debug: generate_firefox_debug firefox cd ./NodeFirefoxDebug && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox-debug:$(VERSION) . -generate_phantomjs: - cd ./NodePhantomJS && ./generate.sh $(VERSION) $(NAMESPACE) $(AUTHORS) - -phantomjs: nodebase generate_phantomjs - cd ./NodePhantomJS && docker build $(BUILD_ARGS) -t $(NAME)/node-phantomjs:$(VERSION) . - tag_latest: docker tag $(NAME)/base:$(VERSION) $(NAME)/base:latest docker tag $(NAME)/hub:$(VERSION) $(NAME)/hub:latest docker tag $(NAME)/node-base:$(VERSION) $(NAME)/node-base:latest docker tag $(NAME)/node-chrome:$(VERSION) $(NAME)/node-chrome:latest docker tag $(NAME)/node-firefox:$(VERSION) $(NAME)/node-firefox:latest - docker tag $(NAME)/node-phantomjs:$(VERSION) $(NAME)/node-phantomjs:latest docker tag $(NAME)/node-chrome-debug:$(VERSION) $(NAME)/node-chrome-debug:latest docker tag $(NAME)/node-firefox-debug:$(VERSION) $(NAME)/node-firefox-debug:latest docker tag $(NAME)/standalone-chrome:$(VERSION) $(NAME)/standalone-chrome:latest @@ -116,7 +108,6 @@ release_latest: docker push $(NAME)/node-base:latest docker push $(NAME)/node-chrome:latest docker push $(NAME)/node-firefox:latest - docker push $(NAME)/node-phantomjs:latest docker push $(NAME)/node-chrome-debug:latest docker push $(NAME)/node-firefox-debug:latest docker push $(NAME)/standalone-chrome:latest @@ -130,7 +121,6 @@ tag_major_minor: docker tag $(NAME)/node-base:$(VERSION) $(NAME)/node-base:$(MAJOR) docker tag $(NAME)/node-chrome:$(VERSION) $(NAME)/node-chrome:$(MAJOR) docker tag $(NAME)/node-firefox:$(VERSION) $(NAME)/node-firefox:$(MAJOR) - docker tag $(NAME)/node-phantomjs:$(VERSION) $(NAME)/node-phantomjs:$(MAJOR) docker tag $(NAME)/node-chrome-debug:$(VERSION) $(NAME)/node-chrome-debug:$(MAJOR) docker tag $(NAME)/node-firefox-debug:$(VERSION) $(NAME)/node-firefox-debug:$(MAJOR) docker tag $(NAME)/standalone-chrome:$(VERSION) $(NAME)/standalone-chrome:$(MAJOR) @@ -142,7 +132,6 @@ tag_major_minor: docker tag $(NAME)/node-base:$(VERSION) $(NAME)/node-base:$(MAJOR).$(MINOR) docker tag $(NAME)/node-chrome:$(VERSION) $(NAME)/node-chrome:$(MAJOR).$(MINOR) docker tag $(NAME)/node-firefox:$(VERSION) $(NAME)/node-firefox:$(MAJOR).$(MINOR) - docker tag $(NAME)/node-phantomjs:$(VERSION) $(NAME)/node-phantomjs:$(MAJOR).$(MINOR) docker tag $(NAME)/node-chrome-debug:$(VERSION) $(NAME)/node-chrome-debug:$(MAJOR).$(MINOR) docker tag $(NAME)/node-firefox-debug:$(VERSION) $(NAME)/node-firefox-debug:$(MAJOR).$(MINOR) docker tag $(NAME)/standalone-chrome:$(VERSION) $(NAME)/standalone-chrome:$(MAJOR).$(MINOR) @@ -154,7 +143,6 @@ tag_major_minor: docker tag $(NAME)/node-base:$(VERSION) $(NAME)/node-base:$(MAJOR_MINOR_PATCH) docker tag $(NAME)/node-chrome:$(VERSION) $(NAME)/node-chrome:$(MAJOR_MINOR_PATCH) docker tag $(NAME)/node-firefox:$(VERSION) $(NAME)/node-firefox:$(MAJOR_MINOR_PATCH) - docker tag $(NAME)/node-phantomjs:$(VERSION) $(NAME)/node-phantomjs:$(MAJOR_MINOR_PATCH) docker tag $(NAME)/node-chrome-debug:$(VERSION) $(NAME)/node-chrome-debug:$(MAJOR_MINOR_PATCH) docker tag $(NAME)/node-firefox-debug:$(VERSION) $(NAME)/node-firefox-debug:$(MAJOR_MINOR_PATCH) docker tag $(NAME)/standalone-chrome:$(VERSION) $(NAME)/standalone-chrome:$(MAJOR_MINOR_PATCH) @@ -168,7 +156,6 @@ release: tag_major_minor @if ! docker images $(NAME)/node-base | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-base version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-chrome | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-chrome version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-firefox | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-firefox version $(VERSION) is not yet built. Please run 'make build'"; false; fi - @if ! docker images $(NAME)/node-phantomjs | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-phantomjs version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-chrome-debug | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-chrome-debug version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-firefox-debug | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-firefox-debug version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/standalone-chrome | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/standalone-chrome version $(VERSION) is not yet built. Please run 'make build'"; false; fi @@ -180,7 +167,6 @@ release: tag_major_minor docker push $(NAME)/node-base:$(VERSION) docker push $(NAME)/node-chrome:$(VERSION) docker push $(NAME)/node-firefox:$(VERSION) - docker push $(NAME)/node-phantomjs:$(VERSION) docker push $(NAME)/node-chrome-debug:$(VERSION) docker push $(NAME)/node-firefox-debug:$(VERSION) docker push $(NAME)/standalone-chrome:$(VERSION) @@ -193,7 +179,6 @@ release: tag_major_minor docker push $(NAME)/node-base:$(MAJOR) docker push $(NAME)/node-chrome:$(MAJOR) docker push $(NAME)/node-firefox:$(MAJOR) - docker push $(NAME)/node-phantomjs:$(MAJOR) docker push $(NAME)/node-chrome-debug:$(MAJOR) docker push $(NAME)/node-firefox-debug:$(MAJOR) docker push $(NAME)/standalone-chrome:$(MAJOR) @@ -206,7 +191,6 @@ release: tag_major_minor docker push $(NAME)/node-base:$(MAJOR).$(MINOR) docker push $(NAME)/node-chrome:$(MAJOR).$(MINOR) docker push $(NAME)/node-firefox:$(MAJOR).$(MINOR) - docker push $(NAME)/node-phantomjs:$(MAJOR).$(MINOR) docker push $(NAME)/node-chrome-debug:$(MAJOR).$(MINOR) docker push $(NAME)/node-firefox-debug:$(MAJOR).$(MINOR) docker push $(NAME)/standalone-chrome:$(MAJOR).$(MINOR) @@ -219,7 +203,6 @@ release: tag_major_minor docker push $(NAME)/node-base:$(MAJOR_MINOR_PATCH) docker push $(NAME)/node-chrome:$(MAJOR_MINOR_PATCH) docker push $(NAME)/node-firefox:$(MAJOR_MINOR_PATCH) - docker push $(NAME)/node-phantomjs:$(MAJOR_MINOR_PATCH) docker push $(NAME)/node-chrome-debug:$(MAJOR_MINOR_PATCH) docker push $(NAME)/node-firefox-debug:$(MAJOR_MINOR_PATCH) docker push $(NAME)/standalone-chrome:$(MAJOR_MINOR_PATCH) @@ -266,9 +249,6 @@ test_firefox_standalone: test_firefox_standalone_debug: VERSION=$(VERSION) NAMESPACE=$(NAMESPACE) ./tests/bootstrap.sh StandaloneFirefoxDebug -test_phantomjs: - VERSION=$(VERSION) NAMESPACE=$(NAMESPACE) ./tests/bootstrap.sh NodePhantomJS - .PHONY: \ all \ @@ -279,13 +259,11 @@ test_phantomjs: ci \ firefox \ firefox_debug \ - phantomjs \ generate_all \ generate_hub \ generate_nodebase \ generate_chrome \ generate_firefox \ - generate_phantomjs \ generate_chrome_debug \ generate_firefox_debug \ generate_standalone_chrome \ diff --git a/NodePhantomJS/Dockerfile b/NodePhantomJS/Dockerfile deleted file mode 100644 index 9cecd23bc0..0000000000 --- a/NodePhantomJS/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. -# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:3.7.1-beryllium -LABEL authors=SeleniumHQ - -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 -ENV NODE_APPLICATION_NAME "" - -USER seluser - -CMD ["/opt/bin/entry_point.sh"] diff --git a/NodePhantomJS/Dockerfile.txt b/NodePhantomJS/Dockerfile.txt deleted file mode 100644 index 928f45ee55..0000000000 --- a/NodePhantomJS/Dockerfile.txt +++ /dev/null @@ -1,30 +0,0 @@ -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 -ENV NODE_APPLICATION_NAME "" - -USER seluser - -CMD ["/opt/bin/entry_point.sh"] diff --git a/NodePhantomJS/README-short.txt b/NodePhantomJS/README-short.txt deleted file mode 100644 index 4daa93be0f..0000000000 --- a/NodePhantomJS/README-short.txt +++ /dev/null @@ -1 +0,0 @@ -Selenium Node configured to run PhantomJS. diff --git a/NodePhantomJS/README.md b/NodePhantomJS/README.md deleted file mode 100644 index ef8c41645f..0000000000 --- a/NodePhantomJS/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# 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/) diff --git a/NodePhantomJS/entry_point.sh b/NodePhantomJS/entry_point.sh deleted file mode 100644 index 4f394e89f7..0000000000 --- a/NodePhantomJS/entry_point.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 diff --git a/NodePhantomJS/generate.sh b/NodePhantomJS/generate.sh deleted file mode 100755 index 546b7e4b65..0000000000 --- a/NodePhantomJS/generate.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -VERSION=$1 -NAMESPACE=$2 -AUTHORS=$3 - -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 $NAMESPACE/node-base:$VERSION >> ./Dockerfile -echo LABEL authors="$AUTHORS" >> ./Dockerfile -echo "" >> ./Dockerfile -cat ./Dockerfile.txt >> ./Dockerfile diff --git a/README.md b/README.md index 243ff9fafb..17dd9d858d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ Images included: - __selenium/node-base__: Base image for Selenium Grid Nodes which includes a virtual desktop environment and VNC support - __selenium/node-chrome__: Selenium node with Chrome installed, needs to be connected to a Selenium Grid Hub - __selenium/node-firefox__: Selenium node with Firefox installed, needs to be connected to a Selenium Grid Hub -- __selenium/node-phantomjs__: Selenium node with PhantomJS installed, needs to be connected to a Selenium Grid Hub - __selenium/standalone-chrome__: Selenium standalone with Chrome installed - __selenium/standalone-firefox__: Selenium standalone with Firefox installed - __selenium/standalone-chrome-debug__: Selenium standalone with Chrome installed and runs a VNC server @@ -93,14 +92,6 @@ $ docker run -d -p 4444:4444 -e HUB_PORT_4444_TCP_ADDR=10.10.1.10 -e HUB_PORT_44 --name selenium-hub selenium/hub:3.7.1-beryllium ``` -### PHANTOMJS_OPTS PhantomJS Configuration Options - -``` bash -$ docker run -d -e PHANTOMJS_OPTS="--ignore-ssl-errors=true" --link selenium-hub:hub selenium/node-phantomjs:3.7.1-beryllium -``` - -You can pass `SE_OPTS` variable with additional commandline parameters for starting a PhantomJS node. - ## Building the images Clone the repo and from the project directory root you can build everything by running: diff --git a/tests/test.py b/tests/test.py index b967cce25c..1beb9deae1 100644 --- a/tests/test.py +++ b/tests/test.py @@ -31,9 +31,6 @@ 'NodeFirefoxDebug': 'node-firefox-debug', 'StandaloneFirefox': 'standalone-firefox', 'StandaloneFirefoxDebug': 'standalone-firefox-debug', - - # PhantomJS Images - 'NodePhantomJS': 'node-phantomjs', } TEST_NAME_MAP = { @@ -48,9 +45,6 @@ 'NodeFirefoxDebug': 'FirefoxTests', 'StandaloneFirefox': 'FirefoxTests', 'StandaloneFirefoxDebug': 'FirefoxTests', - - # PhantomJS Images - 'NodePhantomJS': 'PhantomJSTests', }