fix: do not set network flag when building dockerfile images
The network flag is unsupported by the docker image build command under buildx (which is default now). Closes #7520
This commit is contained in:
@@ -10,12 +10,17 @@ import (
|
||||
)
|
||||
|
||||
// TriggerDockerArgsProcess outputs the network plugin docker options for an app
|
||||
func TriggerDockerArgsProcess(appName string) error {
|
||||
func TriggerDockerArgsProcess(stage string, appName string, imageSourceType string) error {
|
||||
stdin, err := io.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if stage == "build" && imageSourceType == "dockerfile" {
|
||||
fmt.Print(string(stdin))
|
||||
return nil
|
||||
}
|
||||
|
||||
initialNetwork := reportComputedInitialNetwork(appName)
|
||||
if initialNetwork != "" {
|
||||
fmt.Printf(" --network=%s ", initialNetwork)
|
||||
|
||||
Reference in New Issue
Block a user