mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
build: load default build args from env
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@ -2,6 +2,7 @@ package bake
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
|
||||
"github.com/docker/cli/cli/compose/loader"
|
||||
@ -86,6 +87,8 @@ func toMap(in composetypes.MappingWithEquals) map[string]string {
|
||||
for k, v := range in {
|
||||
if v != nil {
|
||||
m[k] = *v
|
||||
} else {
|
||||
m[k] = os.Getenv(k)
|
||||
}
|
||||
}
|
||||
return m
|
||||
|
Reference in New Issue
Block a user