Skip to content

Commit af2197b

Browse files
committed
fix: build-using-dockerfile example hangs indefinitely, because EOF is not sent to the pipe
1 parent 07244fd commit af2197b

File tree

1 file changed

+3
-0
lines changed
  • examples/build-using-dockerfile

1 file changed

+3
-0
lines changed

examples/build-using-dockerfile/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ func action(clicontext *cli.Context) error {
9393
ch := make(chan *client.SolveStatus)
9494
eg, ctx := errgroup.WithContext(ctx)
9595
eg.Go(func() error {
96+
// once Solve/Build returns, close the writer side so loadDockerTar will see EOF
97+
defer pipeW.Close()
98+
9699
var err error
97100
if clicontext.Bool("clientside-frontend") {
98101
_, err = c.Build(ctx, *solveOpt, "", dockerfile.Build, ch)

0 commit comments

Comments
 (0)