mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
		
			
				
	
	
		
			28 lines
		
	
	
		
			590 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			590 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package client
 | |
| 
 | |
| import (
 | |
| 	"net/url"
 | |
| 
 | |
| 	"github.com/docker/engine-api/types"
 | |
| 	"golang.org/x/net/context"
 | |
| )
 | |
| 
 | |
| // ContainerRemove kills and removes a container from the docker host.
 | |
| func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error {
 | |
| 	query := url.Values{}
 | |
| 	if options.RemoveVolumes {
 | |
| 		query.Set("v", "1")
 | |
| 	}
 | |
| 	if options.RemoveLinks {
 | |
| 		query.Set("link", "1")
 | |
| 	}
 | |
| 
 | |
| 	if options.Force {
 | |
| 		query.Set("force", "1")
 | |
| 	}
 | |
| 
 | |
| 	resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil)
 | |
| 	ensureReaderClosed(resp)
 | |
| 	return err
 | |
| }
 |