ability to, at least temporarily, set the storage driver

This commit is contained in:
Brad Rydzewski 2015-05-14 23:58:43 -07:00
parent 8932dda6d9
commit ed32fa5523
2 changed files with 11 additions and 4 deletions

View File

@ -23,10 +23,11 @@ docker run -i --privileged -v $(pwd):/drone/src plugins/drone-docker <<EOF
"branch": "master"
},
"vargs": {
"username": "foo",
"password": "bar",
"username": "kevinbacon",
"password": "pa$$word",
"email": "foo@bar.com",
"repo": "foo/bar"
"repo": "foo/bar",
"storage_driver": "brtfs"
}
}
EOF

View File

@ -12,6 +12,7 @@ import (
)
type Docker struct {
Storage string `json:"storage_driver"`
Registry string `json:"registry"`
Username string `json:"username"`
Password string `json:"password"`
@ -32,6 +33,11 @@ func main() {
os.Exit(1)
}
// Set the storage driver
if len(vargs.Storage) == 0 {
vargs.Storage = "devicemapper"
}
stop := func() {
cmd := exec.Command("start-stop-daemon", "--stop", "--pidfile", "/var/run/docker.pid")
cmd.Stdout = os.Stdout
@ -48,7 +54,7 @@ func main() {
cmd.Stderr = ioutil.Discard
cmd.Run()
cmd = exec.Command("docker", "-d", "-s", "overlay")
cmd = exec.Command("docker", "-d", "-s", vargs.Storage)
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
trace(cmd)