tests/tools/Docker/beremiz-sikuli/Dockerfile
branchwxPython4
changeset 3425 ee3b84d09ccf
child 3431 5bcef31e276d
equal deleted inserted replaced
3424:7db96e011fe7 3425:ee3b84d09ccf
       
     1 #
       
     2 # Dockerfile for Beremiz
       
     3 # This container is used to run tests for Beremiz
       
     4 #
       
     5 FROM ubuntu:focal  
       
     6                                         
       
     7 ENV TERM xterm-256color
       
     8     
       
     9 ENV LANG en_US.UTF-8
       
    10 ENV LANGUAGE en_US:en
       
    11 ENV LC_ALL en_US.UTF-8
       
    12 
       
    13 ARG UNAME=testing
       
    14 ENV UNAME ${UNAME}
       
    15 ARG UID=1000
       
    16 ARG GID=1000
       
    17 RUN groupadd -g $GID $UNAME
       
    18 RUN useradd -m -u $UID -g $GID -s /bin/bash $UNAME
       
    19 
       
    20 RUN set -xe \
       
    21     && apt-get update \
       
    22     && TZ="America/Paris" \
       
    23        DEBIAN_FRONTEND="noninteractive" \
       
    24        apt-get install -y --no-install-recommends \
       
    25                `# run sikuli` \
       
    26                wget \
       
    27                libopencv4.2-java \
       
    28                openjdk-11-jre \
       
    29                \
       
    30                `# run X based tests` \
       
    31                fluxbox \
       
    32                wmctrl xdotool xvfb \
       
    33                x11vnc xterm xnest \
       
    34                \
       
    35                `# to build tested apps` \
       
    36                build-essential automake flex bison mercurial \
       
    37                libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev \
       
    38                libpython2.7-dev libssl-dev \
       
    39                python2 virtualenv
       
    40 
       
    41 # link obtained from https://raiman.github.io/SikuliX1/downloads.html
       
    42 RUN set -xe && \
       
    43     wget -qP /usr/local/bin \
       
    44         https://launchpad.net/sikuli/sikulix/2.0.5/+download/sikulixide-2.0.5.jar && \
       
    45     echo 0795f1e0866ee5a7a84e4c89793ea78c /usr/local/bin/sikulixide-2.0.5.jar | md5sum -c && \
       
    46     ( echo '#!/bin/sh' && \
       
    47       echo "exec java -jar /usr/local/bin/sikulixide-*.jar \"\$@\"" \
       
    48     ) | install /dev/stdin /usr/local/bin/sikulix
       
    49 
       
    50 USER $UNAME
       
    51 
       
    52 RUN mkdir /home/$UNAME/build /home/$UNAME/src /home/$UNAME/test
       
    53 
       
    54 RUN virtualenv --python=$(which python2) ~/beremizenv
       
    55 
       
    56 RUN ~/beremizenv/bin/pip install \
       
    57         lxml future matplotlib zeroconf2 enum34 pyro sslpsk posix_spawn \
       
    58         twisted nevow autobahn \
       
    59         wxPython==4.1.1
       
    60 
       
    61 # easy to remember 'do_tests' alias to invoke main makefile
       
    62 ARG OWNDIRBASENAME=beremiz
       
    63 ENV OWNDIRBASENAME ${OWNDIRBASENAME}
       
    64 RUN echo "alias do_tests='make -f /home/testing/src/beremiz/tests/Makefile'">/home/$UNAME/.bash_aliases
       
    65 
       
    66