mirror of
https://github.com/rancher/os.git
synced 2025-08-01 23:17:50 +00:00
Fix display problem with ros engine list
This commit is contained in:
parent
eccf9554c8
commit
1893c7863b
@ -86,7 +86,7 @@ ARG SYSTEM_DOCKER_URL_amd64=https://github.com/rancher/os-system-docker/releases
|
||||
ARG SYSTEM_DOCKER_URL_arm64=https://github.com/rancher/os-system-docker/releases/download/${SYSTEM_DOCKER_VERSION}/docker-arm64-${SYSTEM_DOCKER_VERSION}.tgz
|
||||
|
||||
ARG USER_DOCKER_VERSION=18.09.8
|
||||
ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION}-ce
|
||||
ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION}
|
||||
|
||||
ARG AZURE_SERVICE=false
|
||||
ARG PROXMOXVE_SERVICE=false
|
||||
|
@ -18,6 +18,7 @@ import (
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
"github.com/rancher/os/pkg/util/versions"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/codegangsta/cli"
|
||||
@ -364,8 +365,14 @@ func CurrentEngine() (engine string) {
|
||||
}
|
||||
if t, ok := image.(reference.NamedTagged); ok {
|
||||
tag := t.Tag()
|
||||
if !strings.HasPrefix(tag, "1.") {
|
||||
// TODO: this assumes we only do Docker ce :/
|
||||
|
||||
// compatible with some patch image tags, such as 17.12.1-1,17.06.2-1,...
|
||||
tag = strings.SplitN(tag, "-", 2)[0]
|
||||
|
||||
if !strings.HasPrefix(tag, "1.") && versions.LessThan(tag, "18.09.0") {
|
||||
// >= 18.09.0, docker-<version>
|
||||
// < 18.09.0 and >= 16.03, docker-<version>-ce
|
||||
// < 17.03, docker-<version>
|
||||
tag = tag + "-ce"
|
||||
}
|
||||
return "docker-" + tag
|
||||
|
Loading…
Reference in New Issue
Block a user