changeset 77:0f366721a499

add dockerfiles for testbench grid
author smith@nwoca.org
date Sat, 26 Mar 2016 15:34:28 +0100
parents aacc99e52f5e
children 3eaeb138e1ae
files testbench-grid/Dockerfile testbench-node/Dockerfile testbench-node/docker-entrypoint.sh
diffstat 3 files changed, 55 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testbench-grid/Dockerfile	Sat Mar 26 15:34:28 2016 +0100
@@ -0,0 +1,13 @@
+FROM java:8-jre
+
+MAINTAINER Dave Smith <smith@nwoca.org>
+
+ENV TESTBENCHJAR=/testbench-standalone.jar
+
+ADD http://files.ssdt.io/vaadin-testbench-standalone-4.0.3.jar $TESTBENCHJAR
+
+EXPOSE 4444
+
+WORKDIR /
+
+CMD ["java", "-jar", "testbench-standalone.jar", "-role", "hub" ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testbench-node/Dockerfile	Sat Mar 26 15:34:28 2016 +0100
@@ -0,0 +1,27 @@
+FROM java:8-jre
+
+MAINTAINER Dave Smith <smith@nwoca.org>
+
+ENV TESTBENCHJAR=/testbench-standalone.jar
+
+RUN mkdir /phantom
+
+WORKDIR /phantom
+
+ADD http://files.ssdt.io/phantomjs-2.1.1-linux-x86_64.tar /phantom/phantomjs.tar
+
+RUN 	tar -xf phantomjs.tar \
+		&& 	mv $(find /phantom -name phantomjs) /bin \
+		&& rm -rf /phantom
+
+ADD http://files.ssdt.io/vaadin-testbench-standalone-4.0.3.jar $TESTBENCHJAR
+
+WORKDIR / 
+
+COPY ./docker-entrypoint.sh /
+
+RUN chmod a+x /docker-entrypoint.sh
+
+ENTRYPOINT [ "./docker-entrypoint.sh" ]
+
+#CMD [ "node" ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testbench-node/docker-entrypoint.sh	Sat Mar 26 15:34:28 2016 +0100
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+case "$1" in
+
+   node)
+     java -jar testbench-standalone.jar -role node -hub http://$HUB_HOST:4444/grid/register -browser "browserName=phantomjs"
+   ;;
+
+  *)
+  exec "$@"
+  ;;
+
+esac
+