build image error:OSError: unexpected end of data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
My code is below, I can connect docker server successfuly,but trying to build image fails.
import docker
client = docker.DockerClient(base_url='tcp://47.92.241.134:2375'
,timeout=30,version='1.27',tls=False)
client.login(username='ssyptxz1',password='Siacloud'
,registry='https://registry.cn-zhangjiakou.aliyuncs.com')
f=open('E:\11\Dockerfile.tar', 'r',encoding='utf-8')
client.images.build(fileobj=f
,tag='registry.cn-zhangjiakou.aliyuncs.com/siacloud/sia-app-yumiao:1.2')
outputs:OSError: unexpected end of data
docker server info:
{'Version': '17.03.2-ce', 'ApiVersion': '1.27', 'MinAPIVersion': '1.12', 'GitCommit': 'f5ec1e2', 'GoVersion': 'go1.6.2', 'Os': 'linux', 'Arch': 'amd64', 'KernelVersion': '4.4.0-117-generic', 'BuildTime': '2018-07-05T23:07:48.822836586+00:00'}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided client.images.build call with Dockerfile.tar against the listed Docker server and API version. Check where the OSError: unexpected end of data occurs and compare the file input with the build request; done means identifying the cause and adding or confirming a regression test for the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100