0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-10 03:30:40 +00:00

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" "branch": "master"
}, },
"vargs": { "vargs": {
"username": "foo", "username": "kevinbacon",
"password": "bar", "password": "pa$$word",
"email": "foo@bar.com", "email": "foo@bar.com",
"repo": "foo/bar" "repo": "foo/bar",
"storage_driver": "brtfs"
} }
} }
EOF EOF

View File

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