mirror of
https://github.com/rancher/os.git
synced 2025-06-28 07:46:49 +00:00
Merge pull request #1056 from joshwget/respect-customization
Fix two instances where customization isn't respected
This commit is contained in:
commit
b0c6ad709c
@ -76,7 +76,7 @@ func consoleSwitch(c *cli.Context) error {
|
||||
Privileged: true,
|
||||
Net: "host",
|
||||
Pid: "host",
|
||||
Image: fmt.Sprintf("rancher/os-base:%s", config.VERSION),
|
||||
Image: config.OS_BASE,
|
||||
Labels: map[string]string{
|
||||
config.SCOPE: config.SYSTEM,
|
||||
},
|
||||
|
@ -50,7 +50,7 @@ func selinuxCommand() cli.Command {
|
||||
"-v", "/etc/selinux:/etc/selinux",
|
||||
"-v", "/var/lib/selinux:/var/lib/selinux",
|
||||
"-v", "/usr/share/selinux:/usr/share/selinux",
|
||||
fmt.Sprintf("rancher/os-selinuxtools:%s", config.VERSION+config.SUFFIX), "bash"}
|
||||
fmt.Sprintf("%s/os-selinuxtools:%s%s", config.OS_REPO, config.VERSION, config.SUFFIX), "bash"}
|
||||
syscall.Exec("/bin/system-docker", argv, []string{})
|
||||
return nil
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/coreos/coreos-cloudinit/config"
|
||||
@ -50,6 +51,8 @@ var (
|
||||
VERSION string
|
||||
ARCH string
|
||||
SUFFIX string
|
||||
OS_REPO string
|
||||
OS_BASE string
|
||||
PrivateKeys = []string{
|
||||
"rancher.ssh",
|
||||
"rancher.docker.ca_key",
|
||||
@ -69,6 +72,9 @@ func init() {
|
||||
if SUFFIX == "" && ARCH != "amd64" {
|
||||
SUFFIX = "_" + ARCH
|
||||
}
|
||||
if OS_BASE == "" {
|
||||
OS_BASE = fmt.Sprintf("%s/os-base:%s%s", OS_REPO, VERSION, SUFFIX)
|
||||
}
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
|
@ -15,6 +15,6 @@ fi
|
||||
OUTPUT=${OUTPUT:-bin/ros}
|
||||
echo Building $OUTPUT
|
||||
|
||||
CONST="-X github.com/docker/docker/dockerversion.GitCommit=${COMMIT} -X github.com/docker/docker/dockerversion.Version=${DOCKER_PATCH_VERSION} -X github.com/docker/docker/dockerversion.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -X github.com/docker/docker/dockerversion.IAmStatic=true -X github.com/rancher/os/config.VERSION=${VERSION}"
|
||||
CONST="-X github.com/docker/docker/dockerversion.GitCommit=${COMMIT} -X github.com/docker/docker/dockerversion.Version=${DOCKER_PATCH_VERSION} -X github.com/docker/docker/dockerversion.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -X github.com/docker/docker/dockerversion.IAmStatic=true -X github.com/rancher/os/config.VERSION=${VERSION} -X github.com/rancher/os/config.OS_REPO=${OS_REPO}"
|
||||
go build -tags "selinux cgo daemon netgo dnspatch" -installsuffix netgo -ldflags "$CONST -linkmode external -extldflags -static" -o ${OUTPUT}
|
||||
strip --strip-all ${OUTPUT}
|
||||
|
Loading…
Reference in New Issue
Block a user