diff options
| author | Sacheendra Talluri <sacheendra.t@gmail.com> | 2017-01-26 18:42:38 +0100 |
|---|---|---|
| committer | Sacheendra Talluri <sacheendra.t@gmail.com> | 2017-01-26 18:42:38 +0100 |
| commit | 01410021a7fe733edab64d7cb4b359685d89cd91 (patch) | |
| tree | f54256b95068df3f62b913d5b04cab61d56c549c /Dockerfile | |
| parent | 8b123384237a40801a621a1df6c094562eee52c1 (diff) | |
Add Dockerfile and related build files
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ad17f041 --- /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:// #needed for gulp to work \ + && 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 |
