Skip to content

Commit

Permalink
fix(buildah): support Dockerfile builder target param to build specif…
Browse files Browse the repository at this point in the history
…ic stage

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Feb 25, 2022
1 parent 5f045c6 commit 44bc718
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/buildah/common.go
Expand Up @@ -41,6 +41,7 @@ type BuildFromDockerfileOpts struct {
CommonOpts
ContextTar io.Reader
BuildArgs map[string]string
Target string
}

type RunMount struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/buildah/native_linux.go
Expand Up @@ -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{}
Expand Down
1 change: 1 addition & 0 deletions pkg/container_runtime/buildah_runtime.go
Expand Up @@ -91,6 +91,7 @@ func (runtime *BuildahRuntime) BuildDockerfile(ctx context.Context, dockerfile [
},
ContextTar: opts.ContextTar,
BuildArgs: buildArgs,
Target: opts.Target,
})
}

Expand Down

0 comments on commit 44bc718

Please sign in to comment.