Skip to content

docker exec and docker logs

Select an icon to see what it is.

Step 4 of 6

Output flows back as frames

Without a TTY, dockerd sends stdout and stderr on one connection, each chunk with an 8-byte header. Byte 0 is the stream (1 stdout, 2 stderr) and bytes 4 to 7 are the length. The CLI reads the frames and prints them.

Multiplexed stream frame

header: 01 00 00 00 00 00 00 14 (stdout, 20 bytes)
payload: 50x.html\nindex.html\n