Merge pull request #13542 from kvasdopil/freebsd-work
Make docker build on FreeBSD Upstream-commit: 75f8bdd970e5355a6238e7b41a9f1aee9cd3f890 Component: engine
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// +build linux freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build !windows
|
||||
// +build linux freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build exclude_graphdriver_aufs,linux
|
||||
// +build exclude_graphdriver_aufs,linux freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build !exclude_graphdriver_zfs,linux
|
||||
// +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// +build freebsd
|
||||
|
||||
package daemon
|
||||
|
||||
// checkExecSupport returns an error if the exec driver does not support exec,
|
||||
// or nil if it is supported.
|
||||
func checkExecSupport(drivername string) error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// +build freebsd
|
||||
|
||||
package execdrivers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/docker/docker/daemon/execdriver"
|
||||
"github.com/docker/docker/pkg/sysinfo"
|
||||
)
|
||||
|
||||
// NewDriver returns a new execdriver.Driver from the given name configured with the provided options.
|
||||
func NewDriver(name string, options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
|
||||
switch name {
|
||||
case "jail":
|
||||
return nil, fmt.Errorf("jail driver not yet supported on FreeBSD")
|
||||
}
|
||||
return nil, fmt.Errorf("unknown exec driver %s", name)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package graphdriver
|
||||
|
||||
var (
|
||||
// Slice of drivers that should be used in an order
|
||||
priority = []string{
|
||||
"zfs",
|
||||
}
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build !linux,!windows
|
||||
// +build !linux,!windows,!freebsd
|
||||
|
||||
package graphdriver
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build linux
|
||||
// +build linux freebsd
|
||||
|
||||
package zfs
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/opencontainers/runc/libcontainer"
|
||||
)
|
||||
|
||||
// convertStatsToAPITypes converts the libcontainer.Stats to the api specific
|
||||
// structs. This is done to preserve API compatibility and versioning.
|
||||
func convertStatsToAPITypes(ls *libcontainer.Stats) *types.Stats {
|
||||
// TODO FreeBSD. Refactor accordingly to fill in stats.
|
||||
s := &types.Stats{}
|
||||
return s
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/runconfig"
|
||||
)
|
||||
|
||||
func mergeLxcConfIntoOptions(hostConfig *runconfig.HostConfig) ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user