summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorLeon Overweel <l.overweel@gmail.com>2017-02-06 12:06:49 +0100
committerGitHub <noreply@github.com>2017-02-06 12:06:49 +0100
commitebbbb9ac91aab60587d7750992e40fcc41f98ad5 (patch)
treedd4410cc8257bca5a06d1e6773b1a67e1b31d306 /Dockerfile
parent6935caadfb67a3e9c6e6147d4a645bdc132f4ee4 (diff)
parentb1d9aa806341c362e770afa70b52094cd016492a (diff)
Merge pull request #1 from sacheendra/master
Add Docker build
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..9df8dca5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,33 @@
+FROM node:7.4
+MAINTAINER Sacheendra Talluri <sacheendra.t@gmail.com>
+
+# Installing python, yarn, gulp and web-server dependencies
+RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
+ && echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
+ && echo "deb http://ftp.debian.org/debian stretch main" >> /etc/apt/sources.list \
+ && apt-get update \
+ && apt-get -y -t stretch install gcc-6 g++-6 \
+ && apt-get install -y python python-pip yarn git sqlite3 sed supervisor \
+ && pip install oauth2client eventlet flask-socketio \
+ && npm install -g gulp-cli \
+ && rm -rf /var/lib/apt/lists/*
+
+# Copy opendc
+COPY ./ /opendc
+
+# Setting up simulator
+RUN mkdir -p /data/database \
+ && chmod 555 /opendc/build/configure.sh \
+ && cd /opendc/opendc-simulator/Simulator \
+ && rm -f ./simulator ./sqlite3.o \
+ && make \
+ && chmod 555 ./simulator \
+ && git config --global url."https://".insteadOf git:// \
+ && cd /opendc/opendc-frontend \
+ && rm -rf /opendc/opendc-frontend/build \
+ && yarn \
+ && gulp --config=../build/frontend_config.json
+
+CMD ["sh", "-c", "cd /opendc && ./build/configure.sh /data/database && /usr/bin/supervisord -c /opendc/build/supervisord.conf"]
+
+VOLUME ["/data/database"] \ No newline at end of file