Skip to content

Commit

Permalink
Merge pull request #2961 from thaJeztah/20.10_backport_fix_context_do…
Browse files Browse the repository at this point in the history
…ckerfile_from_stdin_with_buildkit

[20.10 backport] Fix reading context and dockerfile from stdin with BuildKit
  • Loading branch information
silvin-lubecki authored Feb 18, 2021
2 parents 53c4602 + 0de4e6e commit 61cb016
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/command/image/build_buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
if options.dockerfileFromStdin() {
return errStdinConflict
}
rc, isArchive, err := build.DetectArchiveReader(os.Stdin)
rc, isArchive, err := build.DetectArchiveReader(dockerCli.In())
if err != nil {
return err
}
Expand All @@ -98,7 +98,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
case isLocalDir(options.context):
contextDir = options.context
if options.dockerfileFromStdin() {
dockerfileReader = os.Stdin
dockerfileReader = dockerCli.In()
} else if options.dockerfileName != "" {
dockerfileName = filepath.Base(options.dockerfileName)
dockerfileDir = filepath.Dir(options.dockerfileName)
Expand Down

0 comments on commit 61cb016

Please sign in to comment.