Docker Implementation

Docker, according to Wikipedia is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.

My source found in Github has been built to create Docker images allowing for the deployment on any platform, relatively easily. Each of the components, with the exception of the RFID sensor is available as a separate Docker images.

To do so one must first install Docker, the instructions on how to do that for Windows, Linux and Mac can be found on the Docker site as follows:

  • Macintosh
  • Linux this is for the Centos distribution but others can be found in the index on the left side of the page
  • Windows

Once Docker has been installed and is working the high level installation process is outlined here, but detailed in a document:

  • As Docker images do not have internal storage space Docker volumes for mosquitto, myRailsDb, and myRailsImages need to be created using the following commands:
    • docker volume create –name mosquitto
    • docker volume create –name myRailsDb
    • docker volume create –name myRailsImages
  • To add images to your local Docker repository and convert them into executing containers using the following commands:
    • docker run –name myMongo -v myRailsDb:/data/db -p 27017:27017 -d mongo
    • docker run –link=myMongo:mongodb -p 3000:3000 –name myRids -d dbristow/rids
    • docker run –link=myMongo:mongodb -p 3006:3006 –name myRlds -d dbristow/rlds
    • docker run –link=myMongo:mongodb -p 3007:3007 –name myPpds -d dbristow/ppds
    • docker run -it –name myMqttBrkr -p 1883:1883 -p 9001:9001 -v myMqttBrkr:/mosquitto -d eclipse-mosquitto
    • docker run –link=myMqttBrkr:mqtt -p 3005:3005 –name myIsrs -d dbristow/isrs
    • docker run –network host –name myIsms -d dbristow/isms
    • docker run –link=myMqttBrkr:mqtt -p 3010:3010 –name myIsts -d dbristow/ists
    • docker run –name myMrfm -v myRailsImages:/usr/djb/public -p 3003:3003 -d dbristow/mrfm
    • docker run –link=myRids:rids –link=myIsrs:isrs -p 3002:8080 –name myRsrm -d dbristow/rsrm
    • docker run –link=myRids:rids –link=myMrfm:mrfm -v myRailsImages:/usr/djb/dist/static/img -p 3001:8080 –name myMrim -d dbristow/mrim
    • docker run –link=myPpds:ppds -p 3008:8080 –name myMppm -d dbristow/mppm
    • docker run –link=myRlds:rlds -p 3004:8080 –name myMrlm -d dbristow/mrlm
  • Finally the four Managers can be launched in your browser:
    • http://localhost:3001
    • http://localhost:3002
    • http://localhost:3004
    • http://localhost:3008