docker / docker/docker-py

How can I parse and handle image push response correctly ?

Open
#2,113 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I use client.images.push(repository, stream=True) api to push docker image to remote registry, and get response just like

{"status":"Pushing repository yourname/app (1 tags)"}
{"status":"Pushing","progressDetail":{},"id":"511136ea3c5a"}
{"status":"Image already pushed, skipping","progressDetail":{},
 "id":"511136ea3c5a"}

and now I want to parse those json response to know if the push action is success or not, but find no reference in either docker-py docs nor docker api docs.

so, how can I parse and hadle image push response correctly?

Thx!

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 the client.images.push(repository, stream=True) entry point and compare its streamed JSON response with the Docker API documentation. Done means the project documents how to interpret push events and determine whether the operation succeeded, including the image-already-pushed case.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.