mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Update module github.com/docker/docker to v25
[NO NEW TESTS NEEDED] Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
![29139614+renovate[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Valentin Rothberg

parent
1fc34d8e2f
commit
3e6bfb6e99
@ -23,6 +23,7 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/signal"
|
||||
"github.com/containers/podman/v4/pkg/util"
|
||||
"github.com/docker/docker/api/types"
|
||||
dockerBackend "github.com/docker/docker/api/types/backend"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/go-connections/nat"
|
||||
@ -397,7 +398,7 @@ func LibpodToContainer(l *libpod.Container, sz bool) (*handlers.Container, error
|
||||
NetworkSettings: &networkSettings,
|
||||
Mounts: mounts,
|
||||
},
|
||||
ContainerCreateConfig: types.ContainerCreateConfig{},
|
||||
ContainerCreateConfig: dockerBackend.ContainerCreateConfig{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -307,8 +307,13 @@ func cliOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.C
|
||||
NoHosts: rtc.Containers.NoHosts,
|
||||
}
|
||||
|
||||
// sigh docker-compose sets the mac address on the container config instead on the per network endpoint config
|
||||
containerMacAddress := cc.MacAddress
|
||||
// docker-compose sets the mac address on the container config instead
|
||||
// on the per network endpoint config
|
||||
//
|
||||
// This field is deprecated since API v1.44 where
|
||||
// EndpointSettings.MacAddress is used instead (and has precedence
|
||||
// below). Let's still use it for backwards compat.
|
||||
containerMacAddress := cc.MacAddress //nolint:staticcheck
|
||||
|
||||
// network names
|
||||
switch {
|
||||
@ -555,7 +560,7 @@ func cliOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.C
|
||||
}
|
||||
|
||||
if len(cc.HostConfig.RestartPolicy.Name) > 0 {
|
||||
policy := cc.HostConfig.RestartPolicy.Name
|
||||
policy := string(cc.HostConfig.RestartPolicy.Name)
|
||||
// only add restart count on failure
|
||||
if cc.HostConfig.RestartPolicy.IsOnFailure() {
|
||||
policy += fmt.Sprintf(":%d", cc.HostConfig.RestartPolicy.MaximumRetryCount)
|
||||
|
@ -25,6 +25,7 @@ import (
|
||||
"github.com/containers/storage"
|
||||
docker "github.com/docker/docker/api/types"
|
||||
dockerContainer "github.com/docker/docker/api/types/container"
|
||||
dockerImage "github.com/docker/docker/api/types/image"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -381,7 +382,7 @@ func imageDataToImageInspect(ctx context.Context, l *libimage.Image) (*handlers.
|
||||
DockerVersion: info.Version,
|
||||
GraphDriver: graphDriver,
|
||||
ID: "sha256:" + l.ID(),
|
||||
Metadata: docker.ImageMetadata{},
|
||||
Metadata: dockerImage.Metadata{},
|
||||
Os: info.Os,
|
||||
OsVersion: info.Version,
|
||||
Parent: info.Parent,
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/domain/infra/abi"
|
||||
"github.com/containers/podman/v4/pkg/util"
|
||||
"github.com/docker/docker/api/types"
|
||||
dockerImage "github.com/docker/docker/api/types/image"
|
||||
)
|
||||
|
||||
func PruneImages(w http.ResponseWriter, r *http.Request) {
|
||||
@ -41,7 +42,7 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
idr := make([]types.ImageDeleteResponseItem, 0, len(imagePruneReports))
|
||||
idr := make([]dockerImage.DeleteResponse, 0, len(imagePruneReports))
|
||||
var reclaimedSpace uint64
|
||||
var errorMsg bytes.Buffer
|
||||
for _, p := range imagePruneReports {
|
||||
@ -53,7 +54,7 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
|
||||
continue
|
||||
}
|
||||
|
||||
idr = append(idr, types.ImageDeleteResponseItem{
|
||||
idr = append(idr, dockerImage.DeleteResponse{
|
||||
Deleted: p.Id,
|
||||
})
|
||||
reclaimedSpace += p.Size
|
||||
|
@ -17,9 +17,9 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/api/handlers/utils"
|
||||
api "github.com/containers/podman/v4/pkg/api/types"
|
||||
"github.com/containers/podman/v4/pkg/rootless"
|
||||
docker "github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/registry"
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
dockerSystem "github.com/docker/docker/api/types/system"
|
||||
"github.com/google/uuid"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@ -53,7 +53,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
||||
// liveRestoreEnabled := criu.CheckForCriu() && configInfo.RuntimeSupportsCheckpoint()
|
||||
|
||||
info := &handlers.Info{
|
||||
Info: docker.Info{
|
||||
Info: dockerSystem.Info{
|
||||
Architecture: goRuntime.GOARCH,
|
||||
BridgeNfIP6tables: !sysInfo.BridgeNFCallIP6TablesDisabled,
|
||||
BridgeNfIptables: !sysInfo.BridgeNFCallIPTablesDisabled,
|
||||
@ -62,7 +62,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
||||
CPUSet: sysInfo.Cpuset,
|
||||
CPUShares: sysInfo.CPUShares,
|
||||
CgroupDriver: configInfo.Engine.CgroupManager,
|
||||
ContainerdCommit: docker.Commit{},
|
||||
ContainerdCommit: dockerSystem.Commit{},
|
||||
Containers: infoData.Store.ContainerStore.Number,
|
||||
ContainersPaused: stateInfo[define.ContainerStatePaused],
|
||||
ContainersRunning: stateInfo[define.ContainerStateRunning],
|
||||
@ -81,7 +81,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
||||
Images: infoData.Store.ImageStore.Number,
|
||||
IndexServerAddress: "",
|
||||
InitBinary: "",
|
||||
InitCommit: docker.Commit{},
|
||||
InitCommit: dockerSystem.Commit{},
|
||||
Isolation: "",
|
||||
KernelMemoryTCP: false,
|
||||
KernelVersion: infoData.Host.Kernel,
|
||||
@ -101,14 +101,14 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
||||
OomKillDisable: sysInfo.OomKillDisable,
|
||||
OperatingSystem: infoData.Host.Distribution.Distribution,
|
||||
PidsLimit: sysInfo.PidsLimit,
|
||||
Plugins: docker.PluginsInfo{
|
||||
Plugins: dockerSystem.PluginsInfo{
|
||||
Volume: infoData.Plugins.Volume,
|
||||
Network: infoData.Plugins.Network,
|
||||
Log: infoData.Plugins.Log,
|
||||
},
|
||||
ProductLicense: "Apache-2.0",
|
||||
RegistryConfig: getServiceConfig(runtime),
|
||||
RuncCommit: docker.Commit{},
|
||||
RuncCommit: dockerSystem.Commit{},
|
||||
Runtimes: getRuntimes(configInfo),
|
||||
SecurityOptions: getSecOpts(sysInfo),
|
||||
ServerVersion: versionInfo.Version,
|
||||
@ -190,13 +190,12 @@ func getSecOpts(sysInfo *sysinfo.SysInfo) []string {
|
||||
return secOpts
|
||||
}
|
||||
|
||||
func getRuntimes(configInfo *config.Config) map[string]docker.Runtime {
|
||||
runtimes := map[string]docker.Runtime{}
|
||||
func getRuntimes(configInfo *config.Config) map[string]dockerSystem.RuntimeWithStatus {
|
||||
runtimes := map[string]dockerSystem.RuntimeWithStatus{}
|
||||
for name, paths := range configInfo.Engine.OCIRuntimes {
|
||||
runtimes[name] = docker.Runtime{
|
||||
Path: paths[0],
|
||||
Args: nil,
|
||||
}
|
||||
runtime := dockerSystem.RuntimeWithStatus{}
|
||||
runtime.Runtime = dockerSystem.Runtime{Path: paths[0], Args: nil}
|
||||
runtimes[name] = runtime
|
||||
}
|
||||
return runtimes
|
||||
}
|
||||
|
@ -308,7 +308,10 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
opts := nettypes.NetworkCreateOptions{
|
||||
IgnoreIfExists: !networkCreate.CheckDuplicate,
|
||||
// networkCreate.CheckDuplicate is deprecated since API v1.44,
|
||||
// but it defaults to true when sent by the client package to
|
||||
// older daemons.
|
||||
IgnoreIfExists: false,
|
||||
}
|
||||
ic := abi.ContainerEngine{Libpod: runtime}
|
||||
newNetwork, err := ic.NetworkCreate(r.Context(), network, &opts)
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
"github.com/containers/podman/v4/pkg/domain/infra/abi"
|
||||
docker "github.com/docker/docker/api/types"
|
||||
dockerImage "github.com/docker/docker/api/types/image"
|
||||
"github.com/docker/docker/api/types/volume"
|
||||
)
|
||||
|
||||
@ -24,9 +25,9 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
imgs := make([]*docker.ImageSummary, len(df.Images))
|
||||
imgs := make([]*dockerImage.Summary, len(df.Images))
|
||||
for i, o := range df.Images {
|
||||
t := docker.ImageSummary{
|
||||
t := dockerImage.Summary{
|
||||
Containers: int64(o.Containers),
|
||||
Created: o.Created.Unix(),
|
||||
ID: o.ImageID,
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/domain/entities/reports"
|
||||
"github.com/containers/podman/v4/pkg/inspect"
|
||||
dockerAPI "github.com/docker/docker/api/types"
|
||||
dockerImage "github.com/docker/docker/api/types/image"
|
||||
dockerVolume "github.com/docker/docker/api/types/volume"
|
||||
)
|
||||
|
||||
@ -219,7 +220,7 @@ type execSessionInspect struct {
|
||||
// swagger:response
|
||||
type imageList struct {
|
||||
// in:body
|
||||
Body []dockerAPI.ImageSummary
|
||||
Body []dockerImage.Summary
|
||||
}
|
||||
|
||||
// Image summary for libpod API
|
||||
|
@ -3,13 +3,15 @@ package handlers
|
||||
import (
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
docker "github.com/docker/docker/api/types"
|
||||
dockerBackend "github.com/docker/docker/api/types/backend"
|
||||
dockerContainer "github.com/docker/docker/api/types/container"
|
||||
dockerNetwork "github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/docker/api/types/registry"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
)
|
||||
|
||||
type AuthConfig struct {
|
||||
docker.AuthConfig
|
||||
registry.AuthConfig
|
||||
}
|
||||
|
||||
type ImageInspect struct {
|
||||
@ -79,7 +81,7 @@ type Info struct {
|
||||
|
||||
type Container struct {
|
||||
docker.Container
|
||||
docker.ContainerCreateConfig
|
||||
dockerBackend.ContainerCreateConfig
|
||||
}
|
||||
|
||||
type DiskUsage struct {
|
||||
|
Reference in New Issue
Block a user