Skip to content

DO NOT MERGE: Testing https://github.com/containers/image/pull/2799 #26249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/cyphar/filepath-securejoin v0.4.1
github.com/digitalocean/go-qemu v0.0.0-20250212194115-ee9b0668d242
github.com/docker/distribution v2.8.3+incompatible
github.com/docker/docker v28.1.1+incompatible
github.com/docker/docker v28.2.2+incompatible
github.com/docker/go-connections v0.5.0
github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8
github.com/docker/go-units v0.5.0
Expand All @@ -46,6 +46,7 @@ require (
github.com/mattn/go-shellwords v1.0.12
github.com/mattn/go-sqlite3 v1.14.28
github.com/mdlayher/vsock v1.2.1
github.com/moby/docker-image-spec v1.3.1
github.com/moby/sys/capability v0.4.0
github.com/moby/sys/user v0.4.0
github.com/moby/term v0.5.2
Expand Down Expand Up @@ -152,7 +153,6 @@ require (
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/buildkit v0.22.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.1.0 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
Expand Down Expand Up @@ -212,3 +212,5 @@ require (
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
tags.cncf.io/container-device-interface/specs-go v1.0.0 // indirect
)

replace github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20250530230812-2277cc359d2d
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6J
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/gvisor-tap-vsock v0.8.6 h1:9SeAXK+K2o36CtrgYk6zRXbU3zrayjvkrI8b7/O6u5A=
github.com/containers/gvisor-tap-vsock v0.8.6/go.mod h1:+0mtKmm4STeSDnZe+DGnIwN4EH2f7AcWir7PwT28Ti0=
github.com/containers/image/v5 v5.35.1-0.20250526152843-c64593da00e4 h1:7rvPvBNGjNfgjAmRZhlxA7ooBbLalqTTGoHa9DBVnBY=
github.com/containers/image/v5 v5.35.1-0.20250526152843-c64593da00e4/go.mod h1:JAywiXYidI9NBfCvggVF80nYVAsYrNSRpvHKnalbZG0=
github.com/containers/libhvee v0.10.0 h1:7VLv8keWZpHuGmWvyY4c1mVH5V1JYb1G78VC+8AlrM0=
github.com/containers/libhvee v0.10.0/go.mod h1:at0h8lRcK5jCKfQgU/e6Io0Mw12F36zRLjXVOXRoDTM=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
Expand Down Expand Up @@ -117,12 +115,12 @@ github.com/disiqueira/gotree/v3 v3.0.2 h1:ik5iuLQQoufZBNPY518dXhiO5056hyNBIK9lWh
github.com/disiqueira/gotree/v3 v3.0.2/go.mod h1:ZuyjE4+mUQZlbpkI24AmruZKhg3VHEgPLDY8Qk+uUu8=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A=
github.com/docker/cli v28.2.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I=
github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw=
github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
Expand Down Expand Up @@ -346,6 +344,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mtrmac/image/v5 v5.0.0-20250530230812-2277cc359d2d h1:024Nsm07KVFsWYb9qAvYqy6MounGa9+6+1YuHAL5SjQ=
github.com/mtrmac/image/v5 v5.0.0-20250530230812-2277cc359d2d/go.mod h1:Y7McDLjdK0lFLdRQRCEy0eL+qrw9X+d3mtIdI62mZJk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
Expand Down
56 changes: 14 additions & 42 deletions pkg/api/handlers/compat/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import (
dockerContainer "github.com/docker/docker/api/types/container"
dockerImage "github.com/docker/docker/api/types/image"
dockerStorage "github.com/docker/docker/api/types/storage"
"github.com/docker/go-connections/nat"
dockerSpec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -353,22 +354,20 @@ func imageDataToImageInspect(ctx context.Context, l *libimage.Image) (*handlers.
if err != nil {
return nil, err
}
ports, err := portsToPortSet(info.Config.ExposedPorts)
if err != nil {
return nil, err
}

// TODO: many fields in Config still need wiring
config := dockerContainer.Config{
User: info.User,
ExposedPorts: ports,
Env: info.Config.Env,
Cmd: info.Config.Cmd,
Volumes: info.Config.Volumes,
WorkingDir: info.Config.WorkingDir,
Entrypoint: info.Config.Entrypoint,
Labels: info.Labels,
StopSignal: info.Config.StopSignal,
config := dockerSpec.DockerOCIImageConfig{
ImageConfig: v1.ImageConfig{
User: info.User,
ExposedPorts: info.Config.ExposedPorts,
Env: info.Config.Env,
Cmd: info.Config.Cmd,
Volumes: info.Config.Volumes,
WorkingDir: info.Config.WorkingDir,
Entrypoint: info.Config.Entrypoint,
Labels: info.Labels,
StopSignal: info.Config.StopSignal,
},
}

rootfs := dockerImage.RootFS{}
Expand Down Expand Up @@ -413,33 +412,6 @@ func imageDataToImageInspect(ctx context.Context, l *libimage.Image) (*handlers.
return &handlers.ImageInspect{InspectResponse: dockerImageInspect}, nil
}

// portsToPortSet converts libpod's exposed ports to docker's structs
func portsToPortSet(input map[string]struct{}) (nat.PortSet, error) {
ports := make(nat.PortSet)
for k := range input {
proto, port := nat.SplitProtoPort(k)
switch proto {
// See the OCI image spec for details:
// https://github.com/opencontainers/image-spec/blob/e562b04403929d582d449ae5386ff79dd7961a11/config.md#properties
case "tcp", "":
p, err := nat.NewPort("tcp", port)
if err != nil {
return nil, fmt.Errorf("unable to create tcp port from %s: %w", k, err)
}
ports[p] = struct{}{}
case "udp":
p, err := nat.NewPort("udp", port)
if err != nil {
return nil, fmt.Errorf("unable to create tcp port from %s: %w", k, err)
}
ports[p] = struct{}{}
default:
return nil, fmt.Errorf("invalid port proto %q in %q", proto, k)
}
}
return ports, nil
}

func GetImages(w http.ResponseWriter, r *http.Request) {
decoder := utils.GetDecoder(r)
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
Expand Down
7 changes: 4 additions & 3 deletions pkg/api/handlers/compat/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
// liveRestoreEnabled := criu.CheckForCriu() && configInfo.RuntimeSupportsCheckpoint()
info := &handlers.Info{
Info: dockerSystem.Info{
Architecture: goRuntime.GOARCH,
BridgeNfIP6tables: !sysInfo.BridgeNFCallIP6TablesDisabled,
BridgeNfIptables: !sysInfo.BridgeNFCallIPTablesDisabled,
Architecture: goRuntime.GOARCH,
// FIXME: Do we want to preserve these?
//BridgeNfIP6tables: !sysInfo.BridgeNFCallIP6TablesDisabled,
//BridgeNfIptables: !sysInfo.BridgeNFCallIPTablesDisabled,
CPUCfsPeriod: sysInfo.CPUCfsPeriod,
CPUCfsQuota: sysInfo.CPUCfsQuota,
CPUSet: sysInfo.Cpuset,
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/handlers/compat/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/domain/infra/abi"
docker "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/build"
"github.com/docker/docker/api/types/container"
dockerImage "github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/volume"
Expand Down Expand Up @@ -94,7 +95,7 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) {
Images: imgs,
Containers: ctnrs,
Volumes: vols,
BuildCache: []*docker.BuildCache{},
BuildCache: []*build.CacheRecord{},
BuilderSize: 0,
}})
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion vendor/github.com/docker/docker/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/docker/docker/api/common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading