docker-api-rs icon indicating copy to clipboard operation
docker-api-rs copied to clipboard

Container TTY Resize

Open Dominilk opened this issue 2 years ago • 6 comments

As far as I can tell there is currently no way to resize a container's TTY using this library. It seems to be possible to resize the TTY of an Exec Instance but not the native/entry-point TTY of a container. Api Reference For Container TTY Resize

Thank you!

Dominilk avatar Feb 20 '23 17:02 Dominilk

I will give this one an attempt

casibbald avatar Feb 20 '23 17:02 casibbald

@Dominilk https://github.com/vv9k/docker-api-rs/blob/master/src/opts/exec.rs#L56

Resize is enabled; however, you will need to have created the container with TTY enabled. Can you test this and update us?

Please can you share your test evidence to help me further.

casibbald avatar Feb 20 '23 19:02 casibbald

Thank you for your quick response! As already mentioned in my initial message, I know that the API for resizing exec instances seems to be implemented. Your link references the API for resizing those exec Instances, but I need to resize the entry-point TTY of my container. See the following API references: API implemented: Exec Resize API still missing: Container Resize

These are 2 different API endpoints, the first one for resizing the TTY allocated when executing a command in an existing container and the second one for resizing the main TTY of a container.

Dominilk avatar Feb 20 '23 19:02 Dominilk

@Dominilk, I have started working on it on the following PR: https://github.com/vv9k/docker-api-rs/pull/48

Will see how it goes... its still WIP

casibbald avatar Feb 20 '23 20:02 casibbald

Hi! Are there any updates?

Dominilk avatar Mar 03 '23 12:03 Dominilk

Only saw this Issue (and the accompanying PR) when I was writing my own PR but I've also implemented this logic as a part of #71

not-jan avatar Mar 29 '24 17:03 not-jan