Skip to content

Commit 5506250

Browse files
committed
upgraded docker version to 1.41
1 parent 25d21e7 commit 5506250

File tree

5 files changed

+129
-20
lines changed

5 files changed

+129
-20
lines changed

docker/docker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (cl *Client) ContainerLogsStream(containerID string, output chan []byte, do
348348
func (cl *Client) ContainerCreate(name string, config *container.Config, hostConfig *container.HostConfig, networkConfig *network.NetworkingConfig) (*container.ContainerCreateCreatedBody, error) {
349349
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
350350
defer cancel()
351-
body, err := cl.client.ContainerCreate(ctx, config, hostConfig, networkConfig, name)
351+
body, err := cl.client.ContainerCreate(ctx, config, hostConfig, networkConfig, nil, name)
352352
if err != nil {
353353
return nil, err
354354
}
@@ -471,7 +471,7 @@ func (cl *Client) ImagePullDockerHub(image, tag string, username, password strin
471471
}
472472

473473
// ImageRemove - removes an image by force and prunes its children
474-
func (cl *Client) ImageRemove(imageID string) ([]types.ImageDelete, error) {
474+
func (cl *Client) ImageRemove(imageID string) ([]types.ImageDeleteResponseItem, error) {
475475
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)
476476
defer cancel()
477477

docker/docker_interfaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type Docker interface {
4444
ContainerStats(containerID string) (*types.StatsJSON, error)
4545
ImagesList() ([]types.ImageSummary, error)
4646
ImagePullDockerHub(image, tag string, username, password string) (string, error)
47-
ImageRemove(imageID string) ([]types.ImageDelete, error)
47+
ImageRemove(imageID string) ([]types.ImageDeleteResponseItem, error)
4848
VolumesPrune(pruneFilter filters.Args) (*types.VolumesPruneReport, error)
4949
GetDockerClient() *client.Client
5050
CalculateStats(jsonStats *types.StatsJSON) *models.Stats

docker/docker_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ func TestSystemWideInfo(t *testing.T) {
118118
}
119119
}
120120

121+
func TestDockerPullImage(t *testing.T) {
122+
cl := NewSocketClient(Log(zl), Host("unix:///var/run/docker.sock"))
123+
cl.ImagePullDockerHub("chryscloud/chrysedgeserver", "0.0.8-arm64v8", "", "")
124+
}
125+
121126
//TODO: tests need to be modified to run without actual docker config
122127
// func TestSocketClient(t *testing.T) {
123128
// cl := NewSocketClient(Log(zl), Host("unix:///var/run/docker.sock"))

go.mod

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ go 1.13
55
require (
66
github.com/Microsoft/go-winio v0.4.14 // indirect
77
github.com/blendle/zapdriver v1.3.1
8+
github.com/containerd/containerd v1.4.3 // indirect
89
github.com/dgrijalva/jwt-go v3.2.0+incompatible
910
github.com/docker/distribution v2.7.1+incompatible // indirect
10-
github.com/docker/docker v1.13.1
11+
github.com/docker/docker v20.10.3+incompatible
1112
github.com/docker/go-connections v0.4.0 // indirect
1213
github.com/docker/go-units v0.4.0 // indirect
1314
github.com/gin-gonic/gin v1.6.3
1415
github.com/go-openapi/spec v0.19.9 // indirect
1516
github.com/go-openapi/swag v0.19.9 // indirect
1617
github.com/go-resty/resty/v2 v2.3.0
17-
github.com/golang/protobuf v1.3.5 // indirect
18+
github.com/gogo/protobuf v1.3.2 // indirect
19+
github.com/google/go-cmp v0.5.4 // indirect
20+
github.com/gorilla/mux v1.8.0 // indirect
1821
github.com/mailru/easyjson v0.7.2 // indirect
22+
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
23+
github.com/morikuni/aec v1.0.0 // indirect
1924
github.com/opencontainers/go-digest v1.0.0 // indirect
20-
github.com/pkg/errors v0.9.1 // indirect
21-
github.com/stretchr/testify v1.5.1 // indirect
25+
github.com/opencontainers/image-spec v1.0.1 // indirect
2226
github.com/swaggo/gin-swagger v1.2.0
2327
github.com/swaggo/swag v1.6.7 // indirect
2428
go.uber.org/zap v1.15.0
2529
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
26-
golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect
27-
golang.org/x/tools v0.0.0-20200804234916-fec4f28ebb08 // indirect
30+
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
31+
google.golang.org/grpc v1.35.0 // indirect
2832
gopkg.in/go-playground/assert.v1 v1.2.1
2933
gopkg.in/yaml.v2 v2.3.0
34+
gotest.tools/v3 v3.0.3 // indirect
3035
)

0 commit comments

Comments
 (0)