From c5856784bb4f7d56e8dc43afc8eede25fa963020 Mon Sep 17 00:00:00 2001 From: Nicola Peditto Date: Tue, 27 Mar 2018 11:30:37 +0200 Subject: [PATCH] Dockerfile added. --- Dockerfile | 27 +++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f5f72cc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM node:carbon-slim + +RUN apt-get update && apt-get install -y \ + git python-dev python-setuptools libyaml-dev libpython2.7-dev nmap unzip socat bridge-utils python-pip python-httplib2 libssl-dev libffi-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN npm install -g --unsafe @mdslab/wstun log4js@1.1.1 requestify mysql nconf ip express node-uuid autobahn q body-parser ps-node nodemailer nodemailer-smtp-transport swagger-jsdoc cors bcrypt optimist jsonwebtoken \ + && npm cache --force clean + +RUN mkdir -p /var/lib/iotronic/plugins \ + && mkdir -p /var/lib/iotronic/drivers/ \ + && mkdir -p /var/log/iotronic/ \ + && touch /var/log/iotronic/s4t-iotronic.log + +WORKDIR /usr/local/lib/node_modules/@mdslab/ + +RUN git clone --depth=1 git://github.com/MDSLab/s4t-iotronic-standalone.git ./iotronic-standalone + +ENV NODE_PATH=/usr/local/lib/node_modules +ENV IOTRONIC_HOME=/var/lib/iotronic + +WORKDIR /usr/local/lib/node_modules/@mdslab/iotronic-standalone/ + +VOLUME /var/lib/iotronic + +CMD [ "./bin/server"] + diff --git a/README.md b/README.md index 4ccf6ae..f4f53e2 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ IoTronic (in the standalone version) has been tested to work on: * [Installation guide for Ubuntu 16.04](docs/installation_ubuntu_16.04.md) * [Installation guide for Ubuntu 14.04](docs/installation_ubuntu_14.04.md) - +### LXD container If you want to install IoTronic within an LXD container, you can find a guide [here](docs/installation_lxd.md). ## API documentation