opportunity: official docker image
authorJean Privat <jean@pryen.org>
Sat, 20 Aug 2016 01:16:01 +0000 (21:16 -0400)
committerJean Privat <jean@pryen.org>
Thu, 27 Apr 2017 14:47:56 +0000 (10:47 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/opportunity/docker/Dockerfile [new file with mode: 0644]

diff --git a/contrib/opportunity/docker/Dockerfile b/contrib/opportunity/docker/Dockerfile
new file mode 100644 (file)
index 0000000..f7c2c37
--- /dev/null
@@ -0,0 +1,12 @@
+FROM nitlang/nit
+RUN apt-get update && apt-get install gettext libevent-dev libsqlite3-dev -y
+WORKDIR /nit/contrib/opportunity
+RUN sed -i 's/localhost/0.0.0.0/' src/opportunity_web.nit \
+       && make \
+       # Move the database to the directory db. Add a symlink since its name is hard-coded in the application :(
+       && mkdir -p db/ \
+       && touch db/opportunity \
+       && ln -s db/opportunity .
+EXPOSE 8080
+VOLUME /nit/contrib/opportunity/db/
+CMD bin/opportunity_web 0.0.0.0:8080