mirror of https://github.com/docker/cli.git
Fix reading context and dockerfile from stdin with BuildKit
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
(cherry picked from commit fc9ca9a94a
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
48d30b5b32
commit
0de4e6e9a7
|
@ -78,7 +78,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
|
||||||
if options.dockerfileFromStdin() {
|
if options.dockerfileFromStdin() {
|
||||||
return errStdinConflict
|
return errStdinConflict
|
||||||
}
|
}
|
||||||
rc, isArchive, err := build.DetectArchiveReader(os.Stdin)
|
rc, isArchive, err := build.DetectArchiveReader(dockerCli.In())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ func runBuildBuildKit(dockerCli command.Cli, options buildOptions) error {
|
||||||
case isLocalDir(options.context):
|
case isLocalDir(options.context):
|
||||||
contextDir = options.context
|
contextDir = options.context
|
||||||
if options.dockerfileFromStdin() {
|
if options.dockerfileFromStdin() {
|
||||||
dockerfileReader = os.Stdin
|
dockerfileReader = dockerCli.In()
|
||||||
} else if options.dockerfileName != "" {
|
} else if options.dockerfileName != "" {
|
||||||
dockerfileName = filepath.Base(options.dockerfileName)
|
dockerfileName = filepath.Base(options.dockerfileName)
|
||||||
dockerfileDir = filepath.Dir(options.dockerfileName)
|
dockerfileDir = filepath.Dir(options.dockerfileName)
|
||||||
|
|
Loading…
Reference in New Issue