Docker container

How I built Maidsafe using Docker on Ubuntu 14.04 (including Network Controller)

Install Docker: Get Docker | Docker Docs


Pull the image: sudo docker pull dirvine/maidsafe


Copy the IMAGE ID from running: sudo docker images


To run a container interactively in the foreground: sudo docker run -t -i IMAGE ID /bin/bash

To run a container daemonized in the background: sudo docker run -d IMAGE ID /bin/bash


You are now running as root@CONTAINER ID inside the Maidsafe container


Building Maidsafe


cd /root/MaidSafe/buildgcc


cmake …/


make


Finished!


To leave the container: exit


To get back into the container:

1/ sudo docker start CONTAINER ID

2/ sudo docker attach CONTAINER ID


This includes vim with NERDtree, YCM, tagslist etc. for easy programming. All libs are checked out to next and the image has a read only ssh key to pull any updates from the codebase. This allows people to see and check any binaries we release against known source code. We may also instigate deterministic builds, but this should prove a good and easy setup to test our code has not been tampered with or otherwise corrupted.

We will also release fully configured farmer builds in these containers as well as installer versions. The docker container allows process separation for any people concerned about this aspect.


TestNetwork Example: Local Network Setup

cd /root/MaidSafe/buildgcc

make local_network_controller

./local_network_controller

You should now see something similar to:

MaidSafe Local Network Controller 0.8.100: Main Options


Running: docker - will list all commands

Docker Command line reference: http://docs.docker.com/reference/commandline/cli/


Pro Tip: To Stop/ Remove all containers:

docker stop (docker ps -a -q) docker rm (docker ps -a -q)


To remove the image: docker rmi IMAGE ID


5 Likes