diff --git a/buildah.go b/buildah.go index f760d252767..558cd9f41c1 100644 --- a/buildah.go +++ b/buildah.go @@ -271,6 +271,8 @@ type BuilderOptions struct { // to store copies of layer blobs that we pull down, if any. It should // already exist. BlobDirectory string + // Logger is the logrus logger to write log messages with + Logger *logrus.Logger `json:"-"` // Mount signals to NewBuilder() that the container should be mounted // immediately. Mount bool diff --git a/imagebuildah/stage_executor.go b/imagebuildah/stage_executor.go index 414b01f96b8..7a85cb88e92 100644 --- a/imagebuildah/stage_executor.go +++ b/imagebuildah/stage_executor.go @@ -558,6 +558,7 @@ func (s *StageExecutor) prepare(ctx context.Context, from string, initializeIBCo MaxPullRetries: s.executor.maxPullPushRetries, PullRetryDelay: s.executor.retryPullPushDelay, OciDecryptConfig: s.executor.ociDecryptConfig, + Logger: s.executor.logger, } builder, err = buildah.NewBuilder(ctx, s.executor.store, builderOptions) diff --git a/new.go b/new.go index 85a0f0b31b0..d25eb4959e0 100644 --- a/new.go +++ b/new.go @@ -290,6 +290,7 @@ func newBuilder(ctx context.Context, store storage.Store, options BuilderOptions Format: options.Format, TempVolumes: map[string]bool{}, Devices: options.Devices, + Logger: options.Logger, } if options.Mount {