mirror of
https://github.com/containers/podman.git
synced 2025-09-26 16:25:00 +08:00
Vendor in latest containers/buildah code
This should improve the speed of podman build. Has fixes from containres/image for parallell pull. Also vendor containers/storage and containers/image Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
16
vendor/github.com/containers/buildah/run.go
generated
vendored
16
vendor/github.com/containers/buildah/run.go
generated
vendored
@ -26,6 +26,7 @@ import (
|
||||
"github.com/containers/storage/pkg/idtools"
|
||||
"github.com/containers/storage/pkg/ioutils"
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
units "github.com/docker/go-units"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
@ -944,10 +945,25 @@ func (b *Builder) configureNamespaces(g *generate.Generator, options RunOptions)
|
||||
g.SetHostname(options.Hostname)
|
||||
} else if b.Hostname() != "" {
|
||||
g.SetHostname(b.Hostname())
|
||||
} else {
|
||||
g.SetHostname(stringid.TruncateID(b.ContainerID))
|
||||
}
|
||||
} else {
|
||||
g.SetHostname("")
|
||||
}
|
||||
|
||||
found := false
|
||||
spec := g.Spec()
|
||||
for i := range spec.Process.Env {
|
||||
if strings.HasPrefix(spec.Process.Env[i], "HOSTNAME=") {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
spec.Process.Env = append(spec.Process.Env, fmt.Sprintf("HOSTNAME=%s", spec.Hostname))
|
||||
}
|
||||
|
||||
return configureNetwork, configureNetworks, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user