Skip to content

Docker Network

KevinOneLedger edited this page Nov 20, 2020 · 10 revisions

Docker Network

Setup

Usage

Ubuntu

Install Docker

1. Get convenience script from the official docker site and run it with sudo priveleges.

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

2. Add your user to the 'docker' group in order to run as non-root user.

$ sudo usermod -aG docker your-user

3. Log out and re-log in for the step above to take effect.

Install Docker Compose

1. Upgrade apt sources.

$ sudo apt-get upgrade

2. Download Docker Compose v1.24.0 (You can install a newer version but the behaviour isn't fully tested)

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

3. Change mode of the binary to executable.

$ sudo chmod +x /usr/local/bin/docker-compose

Install Python Dependencies

1. Install pip for python 2.7XX

$ sudo apt install python-pip

2. Install python yaml package

$ pip install pyyaml

Clone Protocol Source Code

1. Install git if you haven't already.

$ sudo apt install git

2. Create a new directory to store your source code.

$ mkdir ~/go

3. Clone Protocol repository.

$ git clone https://github.com/Oneledger/protocol.git

4. Create directories to map as your shared volumes.

$ mkdir -p -- ~/oldata/docker ~/oldata/docker/bin

Build Docker Image

1. Navigate to default folder in the protocol source code.

cd ~/go/protocol/DOCKER-network/default

2. Build docker image.

docker build -t olprotocol .

MacOS

Windows

Clone this wiki locally