1
0
mirror of https://github.com/rancher/os.git synced 2025-06-29 08:16:49 +00:00

Use docker images for the current architecture (vs just for amd64)

Fix #828, #835
This commit is contained in:
Ivan Mikushin 2016-03-28 13:50:29 -07:00
parent 5f362d78a2
commit ee9c21c5f1
3 changed files with 11 additions and 2 deletions

View File

@ -63,7 +63,7 @@ func installAction(c *cli.Context) {
log.WithFields(log.Fields{"err": err}).Fatal("ros install: failed to load config")
}
if image == "" {
image = cfg.Rancher.Upgrade.Image + ":" + config.VERSION
image = cfg.Rancher.Upgrade.Image + ":" + config.VERSION + config.SUFFIX
}
installType := c.String("install-type")

View File

@ -49,7 +49,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), "bash"}
fmt.Sprintf("rancher/os-selinuxtools:%s", config.VERSION + config.SUFFIX), "bash"}
syscall.Exec("/bin/system-docker", argv, []string{})
}

View File

@ -4,6 +4,7 @@ import (
"github.com/coreos/coreos-cloudinit/config"
"github.com/docker/libcompose/project"
"github.com/rancher/netconf"
"runtime"
)
const (
@ -44,12 +45,20 @@ const (
var (
OemConfigFile = OEM + "/oem-config.yml"
VERSION string
ARCH string
SUFFIX string
)
func init() {
if VERSION == "" {
VERSION = "v0.0.0-dev"
}
if ARCH == "" {
ARCH = runtime.GOARCH
}
if SUFFIX == "" && ARCH != "amd64" {
SUFFIX = "_" + ARCH
}
}
type Repository struct {