From: Jean Privat Date: Sat, 21 May 2016 05:38:59 +0000 (-0400) Subject: docker: add a Dockerfile example X-Git-Url: http://nitlanguage.org docker: add a Dockerfile example Signed-off-by: Jean Privat --- diff --git a/misc/docker/hello/Dockerfile b/misc/docker/hello/Dockerfile new file mode 100644 index 0000000..c0a018b --- /dev/null +++ b/misc/docker/hello/Dockerfile @@ -0,0 +1,17 @@ +FROM nitlang/nit + +# Create a workdir +RUN mkdir -p /root/work +WORKDIR /root/work + +# Copy the source code in /root/work/ +COPY . /root/work/ + +# Compile +RUN nitc src/hello.nit --dir . \ + # Clear disk space + && ccache -C +# You can also use a Makefile or what you want + +# Say what to run +CMD ["./hello"] diff --git a/misc/docker/hello/src/hello.nit b/misc/docker/hello/src/hello.nit new file mode 100644 index 0000000..b732142 --- /dev/null +++ b/misc/docker/hello/src/hello.nit @@ -0,0 +1 @@ +print "hello"