mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 06:50:21 +02:00
Support BuildArgs for arg command
This commit is contained in:
@@ -17,9 +17,11 @@ limitations under the License.
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/builder/dockerfile"
|
||||
"github.com/docker/docker/builder/dockerfile/instructions"
|
||||
"github.com/docker/docker/builder/dockerfile/parser"
|
||||
"github.com/docker/docker/builder/dockerfile/shell"
|
||||
"github.com/google/go-containerregistry/v1"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
@@ -222,3 +224,10 @@ func IsSrcRemoteFileURL(rawurl string) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// ReplacementEnvs returns a list of all variables that can be used for
|
||||
// environment replacement
|
||||
func ReplacementEnvs(config *v1.Config, buildArgs *dockerfile.BuildArgs) []string {
|
||||
filtered := buildArgs.FilterAllowed(config.Env)
|
||||
return append(config.Env, filtered...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user