docker-ci: ajoute libicu-dev
[nit.git] / misc / docker / ci / Dockerfile
1 # This is a basic install of Nit on a debian base.
2
3 FROM debian:stretch
4 MAINTAINER Jean Privat <jean@pryen.org>
5
6 # Install dependencies
7 RUN dpkg --add-architecture i386 \
8         && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
9                 # Recomanded builds pakages
10                 build-essential \
11                 ccache \
12                 libgc-dev \
13                 graphviz \
14                 libunwind-dev \
15                 pkg-config \
16                 libicu-dev \
17                 # Get the code!
18                 git \
19                 ca-certificates \
20                 curl \
21                 libcurl4-openssl-dev \
22                 # For nit manpages :)
23                 man \
24                 # Get pip3 for junit2html
25                 python3-dev \
26                 python3-pip \
27                 python3-setuptools \
28                 python3-wheel \
29                 # Packages needed for lib/
30                 gettext \
31                 libegl1-mesa-dev \
32                 libevent-dev \
33                 libgles1-mesa-dev \
34                 libgles2-mesa-dev \
35                 libgtk-3-dev \
36                 libgmp-dev \
37                 libmongoc-dev \
38                 libbson-dev libssl-dev \
39                 libncurses5-dev \
40                 libpq-dev \
41                 libreadline-dev \
42                 libsdl-image1.2-dev \
43                 libsdl-ttf2.0-dev \
44                 libsdl1.2-dev \
45                 libsdl2-dev \
46                 libsdl2-image-dev \
47                 libsdl2-mixer-dev \
48                 libsqlite3-dev \
49                 libx11-dev \
50                 libxdg-basedir-dev \
51                 netcat \
52                 psmisc \
53                 # Packages needed for contrib, platforms and FFI
54                 ant \
55                 clang \
56                 cmake \
57                 default-jdk \
58                 file \
59                 gnupg \
60                 gnuplot-nox \
61                 imagemagick \
62                 inkscape \
63                 libopenmpi-dev \
64                 time \
65                 unzip \
66                 valgrind \
67                 zipalign \
68                 # Android
69                 libc6:i386 \
70                 libstdc++6:i386 \
71                 zlib1g:i386 \
72                 # TODO neo4j mongodb neo4j emscripten test_glsl_validation
73         && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
74         && apt-get install -y nodejs \
75         && rm -rf /var/lib/apt/lists/*
76
77 # Install OpenGL validator
78 RUN git clone https://github.com/KhronosGroup/glslang.git --depth=1 \
79         && mkdir -p glslang/build \
80         && cd glslang/build \
81         && cmake .. \
82         && make \
83         && make install
84
85 # Install android sdk/ndk
86 RUN mkdir -p /opt \
87         && cd /opt \
88         # Android SDK
89         && curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -o android-sdk-linux.zip \
90         && unzip -q android-sdk-linux.zip -d android-sdk-linux \
91         # Download a specific ndk version because old versions are not available trough sdkmanager
92         && curl https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip -o android-ndk-linux.zip \
93         && unzip -q android-ndk-linux.zip \
94         && mv android-ndk-r17c android-sdk-linux/ndk-bundle \
95         && rm android-sdk-linux.zip android-ndk-linux.zip
96 RUN cd /opt \
97         && yes | android-sdk-linux/tools/bin/sdkmanager "build-tools;27.0.0" "cmake;3.6.4111459" platform-tools tools  --verbose\
98         && yes | android-sdk-linux/tools/bin/sdkmanager --licenses --verbose
99 # TODO: predownload bwdgc and gradle?
100
101 # Setup environment variables
102 ENV ANDROID_HOME=/opt/android-sdk-linux/
103 ENV JAVA_HOME=/usr/lib/jvm/default-java/
104 ENV JNI_LIB_PATH=$JAVA_HOME/jre/lib/amd64/server/
105 ENV LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server/
106
107 # Used by CI to render junit files to html
108 RUN pip3 install junit2html
109
110 #  Prepare to install npm (npm is not packaged for debian:stretch)
111 RUN npm install pug-cli -g
112
113 # Some tools, like gradle, need an explitit UTF8 environement
114 ENV LANG C.UTF-8