docker-full: android make tool executable by all users
[nit.git] / misc / docker / Dockerfile
index 655005d..3d795c2 100644 (file)
@@ -1,7 +1,6 @@
-# This is a full install of Nit on a debian base.
-# Full because most dependencies are installed so that most tests can be run
+# This is a basic install of Nit on a debian base.
 
-FROM debian:jessie
+FROM debian:stretch
 MAINTAINER Jean Privat <jean@pryen.org>
 
 # Install dependencies
@@ -22,45 +21,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
        && rm -rf /var/lib/apt/lists/*
 
 # Clone and compile
-RUN git clone https://github.com/nitlang/nit.git /root/nit \
-       && cd /root/nit \
+RUN git clone https://github.com/nitlang/nit.git /nit \
+       && cd /nit \
        && make \
        && . misc/nit_env.sh install \
        # Clean and reduce size
-       && strip c_src/nitc bin/nit* \
+       && { strip c_src/nitc bin/nit* || true; } \
        && ccache -C \
        && rm -rf .git
 
-# Dependencies for more libs and tests
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
-               # Packages needed for lib/
-               libcurl4-openssl-dev \
-               libegl1-mesa-dev \
-               libevent-dev \
-               libgles1-mesa-dev \
-               libgles2-mesa-dev \
-               libgtk-3-dev \
-               libncurses5-dev \
-               libsdl-image1.2-dev \
-               libsdl-ttf2.0-dev \
-               libsdl1.2-dev \
-               libsdl2-dev \
-               libsqlite3-dev \
-               libx11-dev \
-               libxdg-basedir-dev \
-               # Packages needed for platforms and FFI
-               default-jdk \
-               libopenmpi-dev \
-               clang \
-               # TODO neo4j android emscripten test_glsl_validation
-       && rm -rf /var/lib/apt/lists/*
-
-# Run tests
-RUN cd /root/nit/tests \
-       && ./testfull.sh || true \
-       && rm -rf out/ alt/*.nit \
-       && ccache -C
-# TODO: nitunits
-
-WORKDIR /root/nit
-ENTRYPOINT [ "bash" ]
+ENV NIT_DIR /nit
+ENV PATH $NIT_DIR/bin:$PATH
+WORKDIR $NIT_DIR