mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	 65a618886e
			
		
	
	65a618886e
	
	
	
		
			
			Add a new "image" mount type to `--mount`. The source of the mount is the name or ID of an image. The destination is the path inside the container. Image mounts further support an optional `rw,readwrite` parameter which if set to "true" will yield the mount writable inside the container. Note that no changes are propagated to the image mount on the host (which in any case is read only). Mounts are overlay mounts. To support read-only overlay mounts, vendor a non-release version of Buildah. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
		
			
				
	
	
		
			23 lines
		
	
	
		
			526 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			526 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package docker
 | |
| 
 | |
| import (
 | |
| 	"net/http"
 | |
| 	"net/url"
 | |
| 	"strconv"
 | |
| )
 | |
| 
 | |
| // ResizeContainerTTY resizes the terminal to the given height and width.
 | |
| //
 | |
| // See https://goo.gl/FImjeq for more details.
 | |
| func (c *Client) ResizeContainerTTY(id string, height, width int) error {
 | |
| 	params := make(url.Values)
 | |
| 	params.Set("h", strconv.Itoa(height))
 | |
| 	params.Set("w", strconv.Itoa(width))
 | |
| 	resp, err := c.do(http.MethodPost, "/containers/"+id+"/resize?"+params.Encode(), doOptions{})
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	resp.Body.Close()
 | |
| 	return nil
 | |
| }
 |