Alpine base image and some dependencies upgraded
Details in the reweave CHANGELOG
This commit is contained in:
1 parent
1ceeca80e6
commit
0d58e17954
368 files changed
+23406
-9163
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// UpdateContainerOptions specify parameters to the UpdateContainer function.
|
||||
//
|
||||
// See https://goo.gl/Y6fXUy for more details.
|
||||
type UpdateContainerOptions struct {
|
||||
BlkioWeight int `json:"BlkioWeight"`
|
||||
CPUShares int `json:"CpuShares"`
|
||||
CPUPeriod int `json:"CpuPeriod"`
|
||||
CPURealtimePeriod int64 `json:"CpuRealtimePeriod"`
|
||||
CPURealtimeRuntime int64 `json:"CpuRealtimeRuntime"`
|
||||
CPUQuota int `json:"CpuQuota"`
|
||||
CpusetCpus string `json:"CpusetCpus"`
|
||||
CpusetMems string `json:"CpusetMems"`
|
||||
Memory int `json:"Memory"`
|
||||
MemorySwap int `json:"MemorySwap"`
|
||||
MemoryReservation int `json:"MemoryReservation"`
|
||||
KernelMemory int `json:"KernelMemory"`
|
||||
RestartPolicy RestartPolicy `json:"RestartPolicy,omitempty"`
|
||||
Context context.Context
|
||||
}
|
||||
|
||||
// UpdateContainer updates the container at ID with the options
|
||||
//
|
||||
// See https://goo.gl/Y6fXUy for more details.
|
||||
func (c *Client) UpdateContainer(id string, opts UpdateContainerOptions) error {
|
||||
resp, err := c.do(http.MethodPost, fmt.Sprintf("/containers/"+id+"/update"), doOptions{
|
||||
data: opts,
|
||||
forceJSON: true,
|
||||
context: opts.Context,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user