Skip to content
dapithor edited this page May 10, 2014 · 9 revisions
 SSSSS  kk                            tt
SS      kk  kk yy   yy nn nnn    eee  tt
 SSSSS  kkkkk  yy   yy nnn  nn ee   e tttt
     SS kk kk   yyyyyy nn   nn eeeee  tt
 SSSSS  kk  kk      yy nn   nn  eeeee  tttt
                yyyyy

USING DOCKEFILES TO INSTATIATE SKYNET IM on Mac

Introduction

Docker is a way to create a vitualized Server that can be custom built to run different OSes with only the specific dependencies and code needed to professionally launch applications, like Skynet to communicated with the Internet of Everything. A Docker Dockerfile makes it easy for a project to share an application and know that the app will start in a specified environment built with the necessary dependancies to run properly. Read here for more of an in depth look at Docker and how it can help your development workflow.

This Skynet repository comes with a Dockerfile so, if Docker is already installed on your Mac, you can spin it up and start adding devices to create your own Skynet system.

Using the Skynet Dockerfile on Mac

Install OS X VirualBox from here

Install Homebrew by using your Applications->Utilities->Terminal to copy and paste these next lines.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Install boot2docker which helps launch Docker in VirtualBox.

brew install boot2docker
export DOCKER_HOST=tcp://localhost:4243

Install Docker.

brew install docker

Initialize VirtualBox to run Docker with boot2docker.

boot2docker init

Modify the VirtualBox Machine created by boot2docker init named 'boot2docker-vm' to port forward.

VBoxManage modifyvm "boot2docker-vm" --natpf1 "guesthttp,tcp,,3000,,49160"

Start up Docker.

boot2docker up

clone Skynet Project from GitHub

git clone https://github.com/skynetim/skynet.git
cd skynet

Build the Skynet Docker image in the skynet directory with a 'docker image name' you choose.

docker build -t 'docker image name' .

Run the docker image which creates a docker container and spins it up.

docker run -p 49160:3000 -d 'docker image name'

Test to connect to the Skynet running in the docker container from another terminal window.

curl -X GET localhost:3000/status

You should see

{"skynet":"online"}%

Clone this wiki locally