tests/tools/Docker/Dockerfile
changeset 3815 56f08ab3a491
parent 3724 ad3a05cf2066
child 3820 46f3ca3f0157
equal deleted inserted replaced
3814:ab0afe798428 3815:56f08ab3a491
     1 #
     1 #
     2 # Dockerfile for Beremiz
     2 # Dockerfile for Beremiz
     3 # This container is used to run tests for Beremiz
     3 # This container is used to run tests for Beremiz
     4 #
     4 #
     5 FROM ubuntu:focal  
     5 FROM ubuntu:jammy  
     6                                         
     6                                         
     7 ENV TERM xterm-256color
     7 ENV TERM xterm-256color
     8     
     8     
     9 ENV LANG en_US.UTF-8
     9 ENV LANG en_US.UTF-8
    10 ENV LANGUAGE en_US:en
    10 ENV LANGUAGE en_US:en
    39                materia-gtk-theme \
    39                materia-gtk-theme \
    40                \
    40                \
    41                `# to build tested apps` \
    41                `# to build tested apps` \
    42                build-essential automake flex bison mercurial \
    42                build-essential automake flex bison mercurial \
    43                libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev \
    43                libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev \
    44                libpython2.7-dev libssl-dev \
    44                libpython3.10-dev libssl-dev \
    45                python2 virtualenv cmake
    45                python3.10 virtualenv cmake git
    46 
    46 
    47 
    47 
    48 # force bigger font and flat theme for GTK in order to make OCR more reliable
    48 # force bigger font and flat theme for GTK in order to make OCR more reliable
    49 RUN mkdir -p /etc/gtk-3.0
    49 RUN mkdir -p /etc/gtk-3.0
    50 RUN env echo -e '[Settings]\ngtk-font-name=FreeSans,12\ngtk-theme-name=Materia\n' > /etc/gtk-3.0/settings.ini
    50 RUN env echo -e '[Settings]\ngtk-font-name=FreeSans,12\ngtk-theme-name=Materia\n' > /etc/gtk-3.0/settings.ini
    65 
    65 
    66 USER $UNAME
    66 USER $UNAME
    67 
    67 
    68 RUN mkdir /home/$UNAME/build /home/$UNAME/src /home/$UNAME/test
    68 RUN mkdir /home/$UNAME/build /home/$UNAME/src /home/$UNAME/test
    69 
    69 
    70 RUN virtualenv --python=$(which python2) ~/beremizenv
    70 RUN virtualenv ~/beremizenv
       
    71 
       
    72 # wxPython build req
       
    73 RUN ~/beremizenv/bin/pip install gattrdict
       
    74 
       
    75 RUN ~/beremizenv/bin/pip install wxpython
    71 
    76 
    72 RUN ~/beremizenv/bin/pip install \
    77 RUN ~/beremizenv/bin/pip install \
    73         pytest pytest-timeout ddt \
    78         pytest pytest-timeout ddt \
    74         lxml future matplotlib zeroconf2 enum34 pyro sslpsk posix_spawn \
    79         sslpsk posix_spawn \
    75         twisted nevow autobahn click opcua \
    80         opcua \
    76         wxPython==4.1.1
    81         matplotlib lxml \
       
    82         zeroconf \
       
    83         pycountry \
       
    84         Pyro5 msgpack autobahn click
       
    85 
       
    86 RUN ~/beremizenv/bin/pip install \
       
    87         git+https://github.com/beremiz/nevow-py3.git@nevow-0.14.5.dev1
    77 
    88 
    78 RUN set -xe && \
    89 RUN set -xe && \
    79     cd  /home/$UNAME && mkdir tessdata && \
    90     cd  /home/$UNAME && mkdir tessdata && \
    80     wget -q https://github.com/tesseract-ocr/tessdata/archive/refs/tags/4.1.0.tar.gz \
    91     wget -q https://github.com/tesseract-ocr/tessdata/archive/refs/tags/4.1.0.tar.gz \
    81          -O tessdata.tar.gz && \
    92          -O tessdata.tar.gz && \