mirror of
https://github.com/containers/podman.git
synced 2025-09-23 13:13:42 +08:00
Bump github.com/containers/buildah from 1.16.4 to 1.16.5
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.16.4 to 1.16.5. - [Release notes](https://github.com/containers/buildah/releases) - [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md) - [Commits](https://github.com/containers/buildah/compare/v1.16.4...v1.16.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
![27856297+dependabot-preview[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Daniel J Walsh

parent
2adc1b284d
commit
22b1d10d31
31
vendor/github.com/openshift/imagebuilder/builder.go
generated
vendored
31
vendor/github.com/openshift/imagebuilder/builder.go
generated
vendored
@ -332,20 +332,10 @@ func ParseFile(path string) (*parser.Node, error) {
|
||||
|
||||
// Step creates a new step from the current state.
|
||||
func (b *Builder) Step() *Step {
|
||||
argsMap := make(map[string]string)
|
||||
for _, argsVal := range b.Arguments() {
|
||||
val := strings.SplitN(argsVal, "=", 2)
|
||||
if len(val) > 1 {
|
||||
argsMap[val[0]] = val[1]
|
||||
}
|
||||
}
|
||||
|
||||
userArgs := makeUserArgs(b.Env, argsMap)
|
||||
dst := make([]string, len(userArgs)+len(b.RunConfig.Env))
|
||||
copy(dst, userArgs)
|
||||
dst = append(dst, b.RunConfig.Env...)
|
||||
|
||||
return &Step{Env: dst}
|
||||
// Include build arguments in the table of variables that we'll use in
|
||||
// Resolve(), but override them with values from the actual
|
||||
// environment in case there's any conflict.
|
||||
return &Step{Env: mergeEnv(b.Arguments(), mergeEnv(b.Env, b.RunConfig.Env))}
|
||||
}
|
||||
|
||||
// Run executes a step, transforming the current builder and
|
||||
@ -473,7 +463,7 @@ func (b *Builder) FromImage(image *docker.Image, node *parser.Node) error {
|
||||
SplitChildren(node, command.From)
|
||||
|
||||
b.RunConfig = *image.Config
|
||||
b.Env = append(b.Env, b.RunConfig.Env...)
|
||||
b.Env = mergeEnv(b.Env, b.RunConfig.Env)
|
||||
b.RunConfig.Env = nil
|
||||
|
||||
// Check to see if we have a default PATH, note that windows won't
|
||||
@ -573,14 +563,21 @@ var builtinAllowedBuildArgs = map[string]bool{
|
||||
}
|
||||
|
||||
// ParseDockerIgnore returns a list of the excludes in the .dockerignore file.
|
||||
// extracted from fsouza/go-dockerclient.
|
||||
// extracted from fsouza/go-dockerclient and modified to drop comments and
|
||||
// empty lines.
|
||||
func ParseDockerignore(root string) ([]string, error) {
|
||||
var excludes []string
|
||||
ignore, err := ioutil.ReadFile(filepath.Join(root, ".dockerignore"))
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
return excludes, fmt.Errorf("error reading .dockerignore: '%s'", err)
|
||||
}
|
||||
return strings.Split(string(ignore), "\n"), nil
|
||||
for _, e := range strings.Split(string(ignore), "\n") {
|
||||
if len(e) == 0 || e[0] == '#' {
|
||||
continue
|
||||
}
|
||||
excludes = append(excludes, e)
|
||||
}
|
||||
return excludes, nil
|
||||
}
|
||||
|
||||
// ExportEnv creates an export statement for a shell that contains all of the
|
||||
|
Reference in New Issue
Block a user