mirror of https://github.com/docker/docs.git
Add DOCKER_EXPERIMENTAL environment variable
The DOCKER_EXPERIMENTAL environment variable drives the activation of the 'experimental' build tag. Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
This commit is contained in:
parent
0cc5da0635
commit
ca6722f1c5
1
Makefile
1
Makefile
|
@ -7,6 +7,7 @@ DOCKER_ENVS := \
|
||||||
-e BUILDFLAGS \
|
-e BUILDFLAGS \
|
||||||
-e DOCKER_CLIENTONLY \
|
-e DOCKER_CLIENTONLY \
|
||||||
-e DOCKER_EXECDRIVER \
|
-e DOCKER_EXECDRIVER \
|
||||||
|
-e DOCKER_EXPERIMENTAL \
|
||||||
-e DOCKER_GRAPHDRIVER \
|
-e DOCKER_GRAPHDRIVER \
|
||||||
-e DOCKER_STORAGE_OPTS \
|
-e DOCKER_STORAGE_OPTS \
|
||||||
-e TESTDIRS \
|
-e TESTDIRS \
|
||||||
|
|
|
@ -87,6 +87,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||||
fmt.Fprintf(cli.out, " %s\n", attribute)
|
fmt.Fprintf(cli.out, " %s\n", attribute)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(cli.out, "Experimental: %t\n", info.ExperimentalBuild)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,7 @@ type Info struct {
|
||||||
NoProxy string
|
NoProxy string
|
||||||
Name string
|
Name string
|
||||||
Labels []string
|
Labels []string
|
||||||
|
ExperimentalBuild bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// This struct is a temp struct used by execStart
|
// This struct is a temp struct used by execStart
|
||||||
|
|
|
@ -85,6 +85,7 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
||||||
MemTotal: meminfo.MemTotal,
|
MemTotal: meminfo.MemTotal,
|
||||||
DockerRootDir: daemon.Config().Root,
|
DockerRootDir: daemon.Config().Root,
|
||||||
Labels: daemon.Config().Labels,
|
Labels: daemon.Config().Labels,
|
||||||
|
ExperimentalBuild: utils.ExperimentalBuild(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if httpProxy := os.Getenv("http_proxy"); httpProxy != "" {
|
if httpProxy := os.Getenv("http_proxy"); httpProxy != "" {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import (
|
||||||
flag "github.com/docker/docker/pkg/mflag"
|
flag "github.com/docker/docker/pkg/mflag"
|
||||||
"github.com/docker/docker/pkg/reexec"
|
"github.com/docker/docker/pkg/reexec"
|
||||||
"github.com/docker/docker/pkg/term"
|
"github.com/docker/docker/pkg/term"
|
||||||
|
"github.com/docker/docker/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -59,6 +60,10 @@ func main() {
|
||||||
setLogLevel(logrus.DebugLevel)
|
setLogLevel(logrus.DebugLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if utils.ExperimentalBuild() {
|
||||||
|
logrus.Warn("Running experimental build")
|
||||||
|
}
|
||||||
|
|
||||||
if len(flHosts) == 0 {
|
if len(flHosts) == 0 {
|
||||||
defaultHost := os.Getenv("DOCKER_HOST")
|
defaultHost := os.Getenv("DOCKER_HOST")
|
||||||
if defaultHost == "" || *flDaemon {
|
if defaultHost == "" || *flDaemon {
|
||||||
|
|
|
@ -1620,6 +1620,7 @@ Display system-wide information
|
||||||
"Driver": "btrfs",
|
"Driver": "btrfs",
|
||||||
"DriverStatus": [[""]],
|
"DriverStatus": [[""]],
|
||||||
"ExecutionDriver": "native-0.1",
|
"ExecutionDriver": "native-0.1",
|
||||||
|
"ExperimentalBuild": false,
|
||||||
"HttpProxy": "http://test:test@localhost:8080",
|
"HttpProxy": "http://test:test@localhost:8080",
|
||||||
"HttpsProxy": "https://test:test@localhost:8080",
|
"HttpsProxy": "https://test:test@localhost:8080",
|
||||||
"ID": "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS",
|
"ID": "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS",
|
||||||
|
|
|
@ -93,6 +93,12 @@ if [ ! "$GOPATH" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DOCKER_EXPERIMENTAL" ]; then
|
||||||
|
echo >&2 '# WARNING! DOCKER_EXPERIMENTAL is set: building experimental features'
|
||||||
|
echo >&2
|
||||||
|
DOCKER_BUILDTAGS+=" experimental"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$DOCKER_CLIENTONLY" ]; then
|
if [ -z "$DOCKER_CLIENTONLY" ]; then
|
||||||
DOCKER_BUILDTAGS+=" daemon"
|
DOCKER_BUILDTAGS+=" daemon"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
// +build experimental
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
func ExperimentalBuild() bool {
|
||||||
|
return true
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
// +build !experimental
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
func ExperimentalBuild() bool {
|
||||||
|
return false
|
||||||
|
}
|
Loading…
Reference in New Issue