1
0
mirror of https://github.com/rancher/os.git synced 2025-06-30 16:51:47 +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") log.WithFields(log.Fields{"err": err}).Fatal("ros install: failed to load config")
} }
if image == "" { if image == "" {
image = cfg.Rancher.Upgrade.Image + ":" + config.VERSION image = cfg.Rancher.Upgrade.Image + ":" + config.VERSION + config.SUFFIX
} }
installType := c.String("install-type") installType := c.String("install-type")

View File

@ -49,7 +49,7 @@ func selinuxCommand() cli.Command {
"-v", "/etc/selinux:/etc/selinux", "-v", "/etc/selinux:/etc/selinux",
"-v", "/var/lib/selinux:/var/lib/selinux", "-v", "/var/lib/selinux:/var/lib/selinux",
"-v", "/usr/share/selinux:/usr/share/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{}) syscall.Exec("/bin/system-docker", argv, []string{})
} }

View File

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