mirror of https://github.com/docker/compose.git
Ensure extensions map is not nil (should be set by compose-go)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
251c52664a
commit
7c7e75ca00
|
@ -223,6 +223,9 @@ func (s *local) recreateContainer(ctx context.Context, project *types.Project, s
|
||||||
func setDependentLifecycle(project *types.Project, service string, strategy string) {
|
func setDependentLifecycle(project *types.Project, service string, strategy string) {
|
||||||
for i, s := range project.Services {
|
for i, s := range project.Services {
|
||||||
if contains(s.GetDependencies(), service) {
|
if contains(s.GetDependencies(), service) {
|
||||||
|
if s.Extensions == nil {
|
||||||
|
s.Extensions = map[string]interface{}{}
|
||||||
|
}
|
||||||
s.Extensions[extLifecycle] = strategy
|
s.Extensions[extLifecycle] = strategy
|
||||||
project.Services[i] = s
|
project.Services[i] = s
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ func toMobyEnv(environment compose.MappingWithEquals) []string {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
env = append(env, k)
|
env = append(env, k)
|
||||||
} else {
|
} else {
|
||||||
env = append(env, fmt.Sprintf("%s=%s", k, v))
|
env = append(env, fmt.Sprintf("%s=%s", k, *v))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return env
|
return env
|
||||||
|
|
Loading…
Reference in New Issue