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
+35
-21
@@ -5,8 +5,10 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
@@ -16,7 +18,12 @@ import (
|
||||
//
|
||||
// See https://goo.gl/mU7yje for more details.
|
||||
func (c *Client) Version() (*Env, error) {
|
||||
resp, err := c.do("GET", "/version", doOptions{})
|
||||
return c.VersionWithContext(context.TODO())
|
||||
}
|
||||
|
||||
// VersionWithContext returns version information about the docker server.
|
||||
func (c *Client) VersionWithContext(ctx context.Context) (*Env, error) {
|
||||
resp, err := c.do(http.MethodGet, "/version", doOptions{context: ctx})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -42,19 +49,6 @@ type DockerInfo struct {
|
||||
DriverStatus [][2]string
|
||||
SystemStatus [][2]string
|
||||
Plugins PluginsInfo
|
||||
MemoryLimit bool
|
||||
SwapLimit bool
|
||||
KernelMemory bool
|
||||
CPUCfsPeriod bool `json:"CpuCfsPeriod"`
|
||||
CPUCfsQuota bool `json:"CpuCfsQuota"`
|
||||
CPUShares bool
|
||||
CPUSet bool
|
||||
IPv4Forwarding bool
|
||||
BridgeNfIptables bool
|
||||
BridgeNfIP6tables bool `json:"BridgeNfIp6tables"`
|
||||
Debug bool
|
||||
OomKillDisable bool
|
||||
ExperimentalBuild bool
|
||||
NFd int
|
||||
NGoroutines int
|
||||
SystemTime string
|
||||
@@ -79,12 +73,34 @@ type DockerInfo struct {
|
||||
Labels []string
|
||||
ServerVersion string
|
||||
ClusterStore string
|
||||
Runtimes map[string]Runtime
|
||||
ClusterAdvertise string
|
||||
Isolation string
|
||||
InitBinary string
|
||||
DefaultRuntime string
|
||||
LiveRestoreEnabled bool
|
||||
Swarm swarm.Info
|
||||
LiveRestoreEnabled bool
|
||||
MemoryLimit bool
|
||||
SwapLimit bool
|
||||
KernelMemory bool
|
||||
CPUCfsPeriod bool `json:"CpuCfsPeriod"`
|
||||
CPUCfsQuota bool `json:"CpuCfsQuota"`
|
||||
CPUShares bool
|
||||
CPUSet bool
|
||||
IPv4Forwarding bool
|
||||
BridgeNfIptables bool
|
||||
BridgeNfIP6tables bool `json:"BridgeNfIp6tables"`
|
||||
Debug bool
|
||||
OomKillDisable bool
|
||||
ExperimentalBuild bool
|
||||
}
|
||||
|
||||
// Runtime describes an OCI runtime
|
||||
//
|
||||
// for more information, see: https://dockr.ly/2NKM8qq
|
||||
type Runtime struct {
|
||||
Path string
|
||||
Args []string `json:"runtimeArgs"`
|
||||
}
|
||||
|
||||
// PluginsInfo is a struct with the plugins registered with the docker daemon
|
||||
@@ -115,13 +131,11 @@ type ServiceConfig struct {
|
||||
type NetIPNet net.IPNet
|
||||
|
||||
// MarshalJSON returns the JSON representation of the IPNet.
|
||||
//
|
||||
func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal((*net.IPNet)(ipnet).String())
|
||||
}
|
||||
|
||||
// UnmarshalJSON sets the IPNet from a byte array of JSON.
|
||||
//
|
||||
func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
|
||||
var ipnetStr string
|
||||
if err = json.Unmarshal(b, &ipnetStr); err == nil {
|
||||
@@ -147,7 +161,7 @@ type IndexInfo struct {
|
||||
//
|
||||
// See https://goo.gl/ElTHi2 for more details.
|
||||
func (c *Client) Info() (*DockerInfo, error) {
|
||||
resp, err := c.do("GET", "/info", doOptions{})
|
||||
resp, err := c.do(http.MethodGet, "/info", doOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -165,9 +179,9 @@ func (c *Client) Info() (*DockerInfo, error) {
|
||||
//
|
||||
// Some examples:
|
||||
//
|
||||
// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest
|
||||
// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, ""
|
||||
// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest
|
||||
// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest
|
||||
// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, ""
|
||||
// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest
|
||||
func ParseRepositoryTag(repoTag string) (repository string, tag string) {
|
||||
parts := strings.SplitN(repoTag, "@", 2)
|
||||
repoTag = parts[0]
|
||||
|
||||
Reference in new issue
Block a user