Building a Docker image of a single standalone instance on Meshblu with Redis and MongoDB (in the container).
Install Ubuntu Server and install the latest Docker:
- Install Ubuntu in the VM (14.04 LTS Server) or 14.10
- Add OpenSSH Server
- Determine IP
- Connect over SSH
- Update sudo apt-get update
- Upgrade the components (aka patch the OS) sudo apt-get upgrade -y
- Add Docker gpg key (that is 'qO' not 'qZero') sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
- Update the app list sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ >> /etc/apt/sources.list.d/docker.list"
- Update the local apt repository after adding the docker reference sudo apt-get update
- Install (latest) Docker (on 12/15/14 this is 1.4.0) sudo apt-get install lxc-docker -y
Pull the latest build from Github:
- git clone https://github.com/brianehlert/meshblu_docker.git (Git should be installed, error if it is not – then run 'sudo apt-get install git')
Build the container
- cd meshblu_docker
- sudo docker build -t meshblu . Note: that period at the end of the line is very important.
Run the container interactively (you have a console and have to open another terminal to manage Docker, good for debug)
- sudo docker run -i -t -p 3000:3000 -p 5683:5683 meshblu (this maps the container port to the matching host port - note one command per port)
Test that Meshblu is running
- sudo docker ps (list running Docker containers)
- curl http://localhost:3000/status (should output: {"meshblu":"online"} )
An alternate to steps 11 – 13 is to build directly from Github