mirror of
https://github.com/rancher/os.git
synced 2025-09-01 14:48:55 +00:00
Services in compose format
This commit is contained in:
@@ -476,13 +476,11 @@ func isCompose(content string) bool {
|
||||
func toCompose(bytes []byte) ([]byte, error) {
|
||||
result := make(map[interface{}]interface{})
|
||||
compose := make(map[interface{}]interface{})
|
||||
err := yaml.Unmarshal(bytes, &result)
|
||||
err := yaml.Unmarshal(bytes, &compose)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result["services"] = map[interface{}]interface{}{
|
||||
"cloud-config": compose,
|
||||
}
|
||||
result["services"] = compose
|
||||
return yaml.Marshal(result)
|
||||
}
|
||||
|
Reference in New Issue
Block a user