core-extra/daemon/examples/docker
2020-07-22 12:49:11 -07:00
..
daemon.json initial commit with some docker nodes integrating with core at a basic level 2019-06-27 15:45:35 -07:00
docker2core.py combined core.emulator.data and core.emulator.emudata, updated LinkData to leverage InterfaceData, instead of repeated interface fields, removed session from LinkData and LinkOptions 2020-06-16 12:50:24 -07:00
docker2docker.py combined core.emulator.data and core.emulator.emudata, updated LinkData to leverage InterfaceData, instead of repeated interface fields, removed session from LinkData and LinkOptions 2020-06-16 12:50:24 -07:00
README.md added example dockerfile and build command to readme 2020-07-22 12:49:11 -07:00
switch.py combined core.emulator.data and core.emulator.emudata, updated LinkData to leverage InterfaceData, instead of repeated interface fields, removed session from LinkData and LinkOptions 2020-06-16 12:50:24 -07:00

Docker Support

Information on how Docker can be leveraged and included to create nodes based on Docker containers and images to interface with existing CORE nodes, when needed.

Installation

sudo apt install docker.io

Configuration

Custom configuration required to avoid iptable rules being added and removing the need for the default docker network, since core will be orchestrating connections between nodes.

Place the file below in /etc/docker/

  • daemon.json

Group Setup

To use Docker nodes within the python GUI, you will need to make sure the user running the GUI is a member of the docker group.

# add group if does not exist
sudo groupadd docker

# add user to group
sudo usermod -aG docker $USER

# to get this change to take effect, log out and back in or run the following
newgrp docker

Tools and Versions Tested With

  • Docker version 18.09.5, build e8ff056
  • nsenter from util-linux 2.31.1

Examples

This directory provides a few small examples creating Docker nodes and linking them to themselves or with standard CORE nodes.

Images used by nodes need to have networking tools installed for CORE to automate setup and configuration of the container.

Example Dockerfile:

FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y iproute2 ethtool

Build image:

sudo docker build -t <name> .