Merge pull request #2885 from flant/fix-context-dockerfile-from-stdin-with-buildkit

Fix reading context and dockerfile from stdin with BuildKit
This commit is contained in:
Sebastiaan van Stijn 2021-01-06 14:30:51 +01:00 committed by GitHub
commit 2f20bf490e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
@ -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)