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