docker / docker/docker-py

`short_id` and `id` for local image (`DockerClient.images.get()`) are not the image SHA

Open
#3,397 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

Hi,

I've noticed that documentation is slightly off when it comes to id/short_id for the images. id/short_id for registry images are the same as the digests for that images. For local ones however, it can differ. For local images, id/short_id returns ID of the JSON file returned in docker inspect command. It would be good to have an option to get digest of the local image which points out to proper image from the registry.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DockerClient.images.get() and compare its local-image id and short_id behavior with the image data returned by docker inspect. Trace how registry image digests are exposed, then define and test an option that returns the local image's registry digest when available.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.