diff --git a/lib/docker/container.rb b/lib/docker/container.rb index a203b3fd..366722e0 100644 --- a/lib/docker/container.rb +++ b/lib/docker/container.rb @@ -322,6 +322,18 @@ def store_file(path, file_content) archive_in_stream("/", overwrite: true) { output_io.read } end + # Resize the TTY associated with the Container instance + # + # @param query [Hash] API query parameters + # @option query [Fixnum] h Height of the TTY + # @option query [Fixnum] w Width of the TTY + # + # @return [Docker::Container] self + def resize(query = {}) + connection.post(path_for(:resize), query) + self + end + # Create a new Container. def self.create(opts = {}, conn = Docker.connection) query = opts.select {|key| ['name', :name].include?(key) }