Skip to content
Permalink
Browse files
fix(buildah): support Dockerfile builder target param to build specif…
…ic stage

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Feb 25, 2022
1 parent 5f045c6 commit 44bc71810b79379132555bc4bfe022f7863fbabb
Showing with 3 additions and 0 deletions.
  1. +1 −0 pkg/buildah/common.go
  2. +1 −0 pkg/buildah/native_linux.go
  3. +1 −0 pkg/container_runtime/buildah_runtime.go
@@ -41,6 +41,7 @@ type BuildFromDockerfileOpts struct {
CommonOpts
ContextTar io.Reader
BuildArgs map[string]string
Target string
}

type RunMount struct {
@@ -167,6 +167,7 @@ func (b *NativeBuildah) BuildFromDockerfile(ctx context.Context, dockerfile []by
SignaturePolicyPath: b.SignaturePolicyPath,
SystemContext: &b.DefaultSystemContext,
Args: opts.BuildArgs,
Target: opts.Target,
}

errLog := &bytes.Buffer{}
@@ -91,6 +91,7 @@ func (runtime *BuildahRuntime) BuildDockerfile(ctx context.Context, dockerfile [
},
ContextTar: opts.ContextTar,
BuildArgs: buildArgs,
Target: opts.Target,
})
}

0 comments on commit 44bc718

Please sign in to comment.