[BUG] docker compose --env-file path up -d
hangs when path
is a named pipe
#11656
Labels
docker compose --env-file path up -d
hangs when path
is a named pipe
#11656
Description
See getsops/sops#1470. When
sops exec-file
is used, it by default uses a named pipe (instead of writing the decrypted file to disk).It seems that Compose tries to read the file three times, and two times of these happen in the call here:
compose/cmd/compose/compose.go
Line 605 in 3371227
fmt.Printf
statements before and after that line, and I only got the second print after step 5 completed.I'm not sure what is happening, since the code called there only seems to read the file once (https://github.com/compose-spec/compose-go/blob/main/dotenv/env.go#L51). Also I have no clue how to build Compose with modified source from other packages, so I cannot easily add more print statements there to try to get an idea :)
Steps To Reproduce
mkfifo envfile
docker compose --env-file envfile up --detach
cat > envfile
and press CTRL+D. This stops the first read.cat > envfile
and press CTRL+D again. This stops the second read.cat > envfile
and press CTRL+D again. This stops the third read, and Compose starts doing some work.Compose Version
Docker Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: