Skip to content

n054/docker-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weave network driver extension for Docker

A plugin to integrate weave Net with Docker.

Setup:

$ weave launch
$ weave launch-plugin
$ docker network create --driver=weave weave

Starting a container:

$ docker run --net=weave -ti ubuntu

Plugin command-line arguments

  • --socket=<path>, which is the socket on which to listen for the plugin protocol. This defaults to what Docker expects, that is "/run/docker/plugins/weave.sock", but you may wish to change it, for instance if you're running more than one instance of the driver for some reason.

  • --log-level=debug|info|warning|error, which tells the plugin how much information to emit for debugging.

Points to note

Network plugins require Docker version 1.9 or later.

Docker needs a "cluster store"

Weave operates as a "globally scoped" libnetwork driver, which means libnetwork will assume all networks and endpoints are commonly known to all hosts. It does this by using a shared database which you must provide.

As a consequence, you need to supply Docker with the address of a "cluster store" when you start it; for example, an etcd installation.

There's no specific documentation for using a cluster store, but the first part of this guide may help.

WeaveDNS not supported

Weave's built-in service discovery mechanism is not currently supported by the plugin. However, Docker provides a rudimentary discovery mechanism by writing all user-provided container names and hostnames into every container's /etc/hosts.

Restarting

We start the plugin with a restart policy of 'always', because Docker attempts to recreate networks on startup which means the plugin container has to be started. If it isn't started automatically by Docker with a restart policy, it's not possible to start it manually because Docker is blocked.

Building (for developers)

make

You will need the same setup as the weave repository needs; easiest is to use the Vagrantfile in there and add another shared folder for this directory.

About

Weave plugin for Docker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.1%
  • Makefile 4.3%
  • Shell 3.6%