ability to, at least temporarily, set the storage driver
This commit is contained in:
parent
8932dda6d9
commit
ed32fa5523
@ -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
|
||||
|
8
main.go
8
main.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user