Skip to content

Docker multi container setup

Konstantinos Vandikas edited this page Oct 17, 2015 · 3 revisions

Build phase

  • Step 1: Using the iot-framework-engine Docker File
user@host ~ $ docker build -t costa/iot-f:v1 .
  • Step 2: Using the iot-framework-gui Docker file
user@host ~ $ docker build -t costa/iot-gui:v1 .

Run phase

  • Step 1: Using the iot-framework engine Docker file
user@host ~ $ docker run --name iot-f -ti costa/iot-f:v1 start
  • Step 2: Using the iot-framework-gui Docker file
user@host ~ $ docker run --link iot-f:iot-f -p 3000 -dti costa/iot-gui:v1 bin/bash

Known limitations:

    1. iot-framework-engine does not use local storage for storing data. This means restarting the engine's container will result in loosing all data that has been recorded. You can overcome the issue with the following command:
user@host ~ $ docker run --name iot-f -v /opt/iot-framework-engine/priv/data -ti costa/iot-f:v1 start 

The assumption is that you have a local directory, in this case /opt/iot-framework-engine/priv/data. This is the default location where iot-framework-engine stores data so in this case it will use your local directory to record local data.

    1. API configuration for iot-framework-gui needs to be done manually