-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable build tags for all the graphdrivers to be excludable. As an example: ``` $ go build $ ls -l docker -rwxr-xr-x 1 vbatts vbatts 18400158 Mar 14 14:22 docker* $ go build -tags "exclude_graphdriver_aufs exclude_graphdriver_vfs exclude_graphdriver_devicemapper" $ ls -l docker -rwxr-xr-x 1 vbatts vbatts 17467068 Mar 14 14:22 docker* ``` Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
- Loading branch information
Showing
6 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// +build !exclude_graphdriver_aufs | ||
|
||
package runtime | ||
|
||
import ( | ||
"github.com/dotcloud/docker/graph" | ||
"github.com/dotcloud/docker/runtime/graphdriver" | ||
"github.com/dotcloud/docker/runtime/graphdriver/aufs" | ||
"github.com/dotcloud/docker/utils" | ||
) | ||
|
||
// Given the graphdriver ad, if it is aufs, then migrate it. | ||
// If aufs driver is not built, this func is a noop. | ||
func migrateIfAufs(driver graphdriver.Driver, root string) error { | ||
if ad, ok := driver.(*aufs.Driver); ok { | ||
utils.Debugf("Migrating existing containers") | ||
if err := ad.Migrate(root, graph.SetupInitLayer); err != nil { | ||
return err | ||
} | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build !exclude_graphdriver_devicemapper | ||
|
||
package runtime | ||
|
||
import ( | ||
_ "github.com/dotcloud/docker/runtime/graphdriver/devmapper" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build exclude_graphdriver_aufs | ||
|
||
package runtime | ||
|
||
import ( | ||
"github.com/dotcloud/docker/runtime/graphdriver" | ||
) | ||
|
||
func migrateIfAufs(driver graphdriver.Driver, root string) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build !exclude_graphdriver_vfs | ||
|
||
package runtime | ||
|
||
import ( | ||
_ "github.com/dotcloud/docker/runtime/graphdriver/vfs" | ||
) |