clear screen and show cursor when attaching to container

This commit is contained in:
Dawid Dziurla 2019-07-11 19:06:52 +02:00
parent 9bf57b0063
commit 4da06790a9
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

View file

@ -386,6 +386,9 @@ func (c *Container) Attach() error {
// read output from container
go func() {
output := os.Stdout
clearScreen := "\033[2J"
showCursor := "\033[?25h"
_, _ = io.Copy(output, strings.NewReader(clearScreen+showCursor))
_, _ = io.Copy(output, hijack.Conn)
channel <- syscall.SIGINT
}()