mirror of
https://github.com/containers/podman.git
synced 2025-12-09 07:09:03 +08:00
Vendor in latest containers/buildah
This will take a significant size away from the podman-remote executables. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
8
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/containers/image/v5/transports"
|
||||
"github.com/containers/image/v5/transports/alltransports"
|
||||
"github.com/containers/image/v5/types"
|
||||
encconfig "github.com/containers/ocicrypt/config"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
@@ -100,6 +101,7 @@ type Executor struct {
|
||||
os string
|
||||
maxPullPushRetries int
|
||||
retryPullPushDelay time.Duration
|
||||
ociDecryptConfig *encconfig.DecryptConfig
|
||||
}
|
||||
|
||||
// NewExecutor creates a new instance of the imagebuilder.Executor interface.
|
||||
@@ -188,6 +190,7 @@ func NewExecutor(store storage.Store, options BuildOptions, mainNode *parser.Nod
|
||||
os: options.OS,
|
||||
maxPullPushRetries: options.MaxPullPushRetries,
|
||||
retryPullPushDelay: options.PullPushRetryDelay,
|
||||
ociDecryptConfig: options.OciDecryptConfig,
|
||||
}
|
||||
if exec.err == nil {
|
||||
exec.err = os.Stderr
|
||||
@@ -233,7 +236,7 @@ func NewExecutor(store storage.Store, options BuildOptions, mainNode *parser.Nod
|
||||
|
||||
// startStage creates a new stage executor that will be referenced whenever a
|
||||
// COPY or ADD statement uses a --from=NAME flag.
|
||||
func (b *Executor) startStage(stage *imagebuilder.Stage, stages int, from, output string) *StageExecutor {
|
||||
func (b *Executor) startStage(stage *imagebuilder.Stage, stages int, output string) *StageExecutor {
|
||||
if b.stages == nil {
|
||||
b.stages = make(map[string]*StageExecutor)
|
||||
}
|
||||
@@ -248,7 +251,6 @@ func (b *Executor) startStage(stage *imagebuilder.Stage, stages int, from, outpu
|
||||
stage: stage,
|
||||
}
|
||||
b.stages[stage.Name] = stageExec
|
||||
b.stages[from] = stageExec
|
||||
if idx := strconv.Itoa(stage.Position); idx != stage.Name {
|
||||
b.stages[idx] = stageExec
|
||||
}
|
||||
@@ -421,7 +423,7 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) (image
|
||||
output = b.output
|
||||
}
|
||||
|
||||
stageExecutor := b.startStage(&stage, len(stages), base, output)
|
||||
stageExecutor := b.startStage(&stage, len(stages), output)
|
||||
|
||||
// If this a single-layer build, or if it's a multi-layered
|
||||
// build and b.forceRmIntermediateCtrs is set, make sure we
|
||||
|
||||
Reference in New Issue
Block a user