directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1761328 - in /directory/studio/trunk/tests/test.integration.ui: Dockerfile README.Dockerfile
Date Sun, 18 Sep 2016 13:24:39 GMT
Author: seelmann
Date: Sun Sep 18 13:24:39 2016
New Revision: 1761328

URL: http://svn.apache.org/viewvc?rev=1761328&view=rev
Log:
Simpler an smaller docker image

Modified:
    directory/studio/trunk/tests/test.integration.ui/Dockerfile
    directory/studio/trunk/tests/test.integration.ui/README.Dockerfile

Modified: directory/studio/trunk/tests/test.integration.ui/Dockerfile
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/Dockerfile?rev=1761328&r1=1761327&r2=1761328&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/Dockerfile (original)
+++ directory/studio/trunk/tests/test.integration.ui/Dockerfile Sun Sep 18 13:24:39 2016
@@ -17,18 +17,11 @@
 #   under the License.
 #
 
-FROM debian:8
+FROM alpine
 
-RUN \
-     apt-get update && \
-     apt-get install -y xvfb openssh-server && \
-     apt-get clean && \
-     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
-     mkdir /var/run/sshd && \
-     ssh-keygen -q -f /root/.ssh/id_rsa -N "" && \
-     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
+RUN apk add --no-cache xvfb
 
-EXPOSE 6006
+ENV DISPLAY :6
 
-CMD /usr/sbin/sshd && ssh -o StrictHostKeyChecking=no -T -L *:6006:localhost:6000
root@localhost Xvfb :0 -screen 0 1024x768x16
+CMD Xvfb $DISPLAY -ac -listen tcp -screen 0 1024x768x16
 

Modified: directory/studio/trunk/tests/test.integration.ui/README.Dockerfile
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/README.Dockerfile?rev=1761328&r1=1761327&r2=1761328&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/README.Dockerfile (original)
+++ directory/studio/trunk/tests/test.integration.ui/README.Dockerfile Sun Sep 18 13:24:39
2016
@@ -22,8 +22,6 @@ A docker image to run Xvfb within a dock
 
 Used to run Apache Directory Studio UI tests on Jenkins.
 
-Currently the display port (:6, TCP 6006) is hardcoded.
-
 
 ## Build image
 
@@ -38,10 +36,14 @@ Currently the display port (:6, TCP 6006
 ## Usage
 
     CONTAINER_NAME="dir-studio-ui-tests-xvfb"
-    docker run -d --name $CONTAINER_NAME -p 6006:6006 apachedirectory/xvfb
-    export DISPLAY=:6
+    for PORT in $(seq 6006 6099); do netstat -tln | grep $PORT || break; done
+    echo "Using TCP port $PORT for Xvfb"
+    export DISPLAY=:$((PORT-6000))
+    echo "Using DISPLAY $DISPLAY"
+    docker run -d --name $CONTAINER_NAME -e DISPLAY=$DISPLAY -p $PORT:$PORT apachedirectory/xvfb
+    xdpyinfo -display $DISPLAY
     mvn clean install -Denable-ui-tests
     docker stop $CONTAINER_NAME
-    docker run $CONTAINER_NAME
+    docker rm $CONTAINER_NAME
 
 



Mime
View raw message