Crazy sekai overturns the small pond

This commit is contained in:
世界
2024-10-21 23:38:34 +08:00
parent ce5b4b06b5
commit bec88944e0
139 changed files with 2866 additions and 1555 deletions

View File

@@ -17,7 +17,7 @@ import (
"github.com/sagernet/sing/common/control"
F "github.com/sagernet/sing/common/format"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -68,7 +68,7 @@ func init() {
}
defer dockerClient.Close()
list, err := dockerClient.ImageList(context.Background(), types.ImageListOptions{All: true})
list, err := dockerClient.ImageList(context.Background(), image.ListOptions{All: true})
if err != nil {
log.Warn(err)
return
@@ -85,13 +85,13 @@ func init() {
return false
}
for _, image := range allImages {
if imageExist(image) {
for _, i := range allImages {
if imageExist(i) {
continue
}
log.Info("pulling image: ", image)
imageStream, err := dockerClient.ImagePull(context.Background(), image, types.ImagePullOptions{})
log.Info("pulling image: ", i)
imageStream, err := dockerClient.ImagePull(context.Background(), i, image.PullOptions{})
if err != nil {
panic(err)
}