diff --git a/README.md b/README.md index 1eef91f..42e9d5c 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,34 @@ The method below will install the sysvinit and /etc/default options that can be ``` $ sudo docker-volume-netshare nfs ``` +**2. Run the plugin - adding the correct DOCKER_API_VERSION If you are not using the latest stable version of docker engine please specify the version with flag. For example: +To check docker API version: +``` +docker version +Client: +Version: 17.12.0-ce +API version: 1.35 +Go version: go1.9.2 +Git commit: c97c6d6 +Built: Wed Dec 27 20:11:19 2017 +OS/Arch: linux/amd64 + +Server: +Engine: + Version: 17.12.0-ce + API version: 1.35 (minimum version 1.12) + Go version: go1.9.2 + Git commit: c97c6d6 + Built: Wed Dec 27 20:09:53 2017 + OS/Arch: linux/amd64 + Experimental: false +``` +Here the Docker API Version is 1.35. So you should start the plugin with the right version of Docker API. + +Minimum supported version for the plugin is 1.12. + ``` $ sudo docker-volume-netshare nfs -a 1.35 ``` @@ -96,7 +122,7 @@ For example: **1. Run the plugin - can be added to systemd or run in the background** ``` - $ sudo docker-volume-netshare cifs --username user --password pass --domain domain --security security + $ sudo docker-volume-netshare cifs --username user --password pass --domain domain --security security -a docker_api_version ``` **2. Launch a container** @@ -128,7 +154,7 @@ See example: **2. Run the plugin** ``` - $ sudo docker-volume-netshare cifs + $ sudo docker-volume-netshare cifs -a docker_api_version ``` **3. Launch a container** @@ -146,7 +172,7 @@ options and other info can be eliminated when running a container. **1. Run the plugin - can be added to systemd or run in the background** ``` - $ sudo docker-volume-netshare cifs + $ sudo docker-volume-netshare cifs -a docker_api_version ``` **2. Create a Volume** diff --git a/main.go b/main.go index cc5fbc9..fa8c1df 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/jakirpatel/docker-volume-netshare/netshare" + "github.com/ContainX/docker-volume-netshare/netshare" ) var VERSION string = "" diff --git a/netshare/netshare.go b/netshare/netshare.go index b666686..902d837 100644 --- a/netshare/netshare.go +++ b/netshare/netshare.go @@ -1,20 +1,20 @@ package netshare import ( + "context" "fmt" "os" "path/filepath" "strconv" "syscall" - "context" - "github.com/jakirpatel/docker-volume-netshare/netshare/drivers" - log "github.com/sirupsen/logrus" - "github.com/docker/go-plugins-helpers/volume" - "github.com/spf13/cobra" - "github.com/docker/docker/client" + "github.com/ContainX/docker-volume-netshare/netshare/drivers" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/client" + "github.com/docker/go-plugins-helpers/volume" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" ) const (