Vendor in latest containers/buildah

Pulls in fix for COPY --from when using --layers

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
Urvashi Mohnani
2018-11-20 20:07:17 +00:00
parent fe4f09493f
commit bd61c779ca
10 changed files with 153 additions and 44 deletions

View File

@ -27,11 +27,6 @@ var (
obRgex = regexp.MustCompile(`(?i)^\s*ONBUILD\s*`)
)
// dispatch with no layer / parsing. This is effectively not a command.
func nullDispatch(b *Builder, args []string, attributes map[string]bool, flagArgs []string, original string) error {
return nil
}
// ENV foo bar
//
// Sets the environment variable foo to bar, also makes interpolation
@ -181,6 +176,17 @@ func from(b *Builder, args []string, attributes map[string]bool, flagArgs []stri
}
name := args[0]
// Support ARG before from
argStrs := []string{}
for n, v := range b.Args {
argStrs = append(argStrs, n+"="+v)
}
var err error
if name, err = ProcessWord(name, argStrs); err != nil {
return err
}
// Windows cannot support a container with no base image.
if name == NoBaseImageSpecifier {
if runtime.GOOS == "windows" {
@ -438,6 +444,7 @@ func healthcheck(b *Builder, args []string, attributes map[string]bool, flagArgs
healthcheck := docker.HealthConfig{}
flags := flag.NewFlagSet("", flag.ContinueOnError)
flags.String("start-period", "", "")
flags.String("interval", "", "")
flags.String("timeout", "", "")
flRetries := flags.String("retries", "", "")
@ -462,6 +469,12 @@ func healthcheck(b *Builder, args []string, attributes map[string]bool, flagArgs
return fmt.Errorf("Unknown type %#v in HEALTHCHECK (try CMD)", typ)
}
period, err := parseOptInterval(flags.Lookup("start-period"))
if err != nil {
return err
}
healthcheck.StartPeriod = period
interval, err := parseOptInterval(flags.Lookup("interval"))
if err != nil {
return err