&& 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
&& ccache -C \
&& rm -rf .git
-ENV NIT_DIR /root/nit
+ENV NIT_DIR /nit
ENV PATH $NIT_DIR/bin:$PATH
WORKDIR $NIT_DIR
~~~
host$ docker run -ti nitlang/nit
-root@ce9b671dd9fc:/root/nit# nitc examples/hello_world.nit
-root@ce9b671dd9fc:/root/nit# ./hello_world
+root@ce9b671dd9fc:/nit# nitc examples/hello_world.nit
+root@ce9b671dd9fc:/nit# ./hello_world
hello world
~~~
FROM nitlang/nit
# Create a workdir
-RUN mkdir -p /root/work
-WORKDIR /root/work
+RUN mkdir -p /work
+WORKDIR /work
-# Copy the source code in /root/work/
-COPY . /root/work/
+# Copy the source code in /work/
+COPY . /work/
# Compile
RUN nitc src/hello.nit --dir . \
ENV PATH $PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK
# Run tests
-RUN cd /root/nit/tests \
+RUN cd /nit/tests \
# Basic tests
&& ./testfull.sh || true \
&& rm -rf out/ alt/*.nit \
&& ../bin/nitunit ../lib ../contrib || true \
&& rm -rf .nitunit \
&& ccache -C
-
-WORKDIR /root/nit
-ENTRYPOINT [ "bash" ]
FROM nitlang/nit
# Create a workdir
-RUN mkdir -p /root/work
-WORKDIR /root/work
+RUN mkdir -p /work
+WORKDIR /work
-# Copy the source code in /root/work/
-COPY . /root/work/
+# Copy the source code in /work/
+COPY . /work/
# Compile
RUN nitc src/hello.nit --dir . \