Add target opt to DockerBuild
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
parent
6c806a7226
commit
38200f556c
@ -842,6 +842,13 @@ func dockerBuildOpts(op *compiler.Value) (map[string]string, error) {
|
|||||||
opts["filename"] = filename
|
opts["filename"] = filename
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if target := op.Lookup("target"); target.Exists() {
|
||||||
|
tgr, err := target.String()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
opts["target"] = tgr
|
||||||
|
}
|
||||||
if buildArgs := op.Lookup("buildArg"); buildArgs.Exists() {
|
if buildArgs := op.Lookup("buildArg"); buildArgs.Exists() {
|
||||||
fields, err := buildArgs.Fields()
|
fields, err := buildArgs.Fields()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -92,6 +92,7 @@ package op
|
|||||||
platforms?: [...string]
|
platforms?: [...string]
|
||||||
buildArg?: [string]: string
|
buildArg?: [string]: string
|
||||||
label?: [string]: string
|
label?: [string]: string
|
||||||
|
target?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
#WriteFile: {
|
#WriteFile: {
|
||||||
|
Reference in New Issue
Block a user