docker / docker/docker-py

Push images without error handling

Open
#2,555 0 comments 1 reaction 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

Push the image to the remote repository,
No authentication information is configured,
The return code is 200,
No error message.

import docker c = docker.APIClient(base_url='unix:///var/run/docker.sock') c.push('xxx.xxx.com/xxx/etcd:3.0.17')

[2020-05-01 10:51:22] [DEBUG] Looking for auth config
[2020-05-01 10:51:22] [DEBUG] No auth config in memory - loading from filesystem
[2020-05-01 10:51:22] [DEBUG] Trying paths: ['/root/.docker/config.json', '/root/.dockercfg']
[2020-05-01 10:51:22] [DEBUG] No config file found
[2020-05-01 10:51:22] [DEBUG] Looking for auth entry for 'registry.cn-shenzhen.aliyuncs.com'
[2020-05-01 10:51:22] [DEBUG] No entry found
[2020-05-01 10:51:22] [DEBUG] No auth config found
[2020-05-01 10:51:22] [DEBUG] http://localhost:None "POST /v1.35/images/registry.cn-shenzhen.aliyuncs.com/xxx/etcd/push?tag=3.0.17 HTTP/1.1" 200 None

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 docker.APIClient.push using the provided unauthenticated registry example and inspect how its HTTP response and streamed Docker Engine API output are handled. Reproduce the shown 200 response, then verify that the missing authentication or push failure is surfaced as an error message instead of being treated as success.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.