1
0
mirror of https://github.com/rancher/os.git synced 2025-09-08 10:11:46 +00:00

Add multi docker command

This commit is contained in:
Jason-ZW
2018-06-27 12:08:32 +08:00
committed by niusmallnan
parent 05c2a40aa5
commit 0821c9a4ea
9 changed files with 489 additions and 14 deletions

View File

@@ -13,10 +13,16 @@ import (
)
func LoadService(p *project.Project, cfg *config.CloudConfig, useNetwork bool, service string) error {
bytes, err := network.LoadServiceResource(service, useNetwork, cfg)
if err != nil {
log.Error(err)
return err
// First check the multi engine service file.
// If the name has been found in multi enging service file and matches, will not execute network.LoadServiceResource
// Otherwise will execute network.LoadServiceResource
bytes, err := network.LoadMultiEngineResource(service)
if err != nil || bytes == nil {
bytes, err = network.LoadServiceResource(service, useNetwork, cfg)
if err != nil {
log.Error(err)
return err
}
}
m := map[interface{}]interface{}{}