Skip to content
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

Image inspect API (images/{name}/json) returns null RepoDigests #45556

Closed
NS-TomYang opened this issue May 18, 2023 · 2 comments · Fixed by #45563
Closed

Image inspect API (images/{name}/json) returns null RepoDigests #45556

NS-TomYang opened this issue May 18, 2023 · 2 comments · Fixed by #45563
Assignees
Labels
area/api area/images kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. version/24.0

Comments

@NS-TomYang
Copy link

Description

Image inspect API (images/{name}/json) returns null RepoDigests

#45068 changed the behavior of RepoDigests, but is the null object expected?

Reproduce

curl --unix-socket /var/run/docker.sock "http://localhost/images/25cd1848987f/json" | json_pp

Result from Docker 3.0.6 (API v1.42)

   "Os" : "linux",
   "Parent" : "sha256:b599b8a799458fa7495dac80ed387bac8993b2bf3e7f5994ff1ef354033bee28",
   "RepoDigests" : [],

Result from Docker 4.0.0 (API v1.43)

   "Os" : "linux",
   "Parent" : "sha256:b599b8a799458fa7495dac80ed387bac8993b2bf3e7f5994ff1ef354033bee28",
   "RepoDigests" : null,

Expected behavior

At least from API v1.42 document https://docs.docker.com/engine/api/v1.42/#tag/Image/operation/ImageCreate

The format of the RepoDigests should be the array of the string.

docker version

Client: Docker Engine - Community
 Version:           24.0.0
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        98fdcd7
 Built:             Mon May 15 18:48:35 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.0
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       1331b8c
  Built:            Mon May 15 18:48:35 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.19
  GitCommit:        1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    24.0.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.4
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.17.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 2
 Server Version: 24.0.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.4.0-146-generic
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.84GiB
 Name: npa-publisher
 ID: a9648b36-5329-4a53-9e90-28ebd6b900a8
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Additional Info

No response

@NS-TomYang NS-TomYang added kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage labels May 18, 2023
@thaJeztah
Copy link
Member

/cc @vvoland

@vvoland
Copy link
Contributor

vvoland commented May 18, 2023

It's a "regression" introduced in: #43883
Opened a PR: #45563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api area/images kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. version/24.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants