8000 using private image in FROM during build is broken · Issue #1683 · docker/docker-py · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
using private image in FROM during build is broken #1683
Closed
@leroix

Description

@leroix

Example:

import docker
from io import BytesIO

dockerfile="""
FROM <some-private-image-on-docker-hub>
CMD ["ls"]
"""

f = BytesIO(dockerfile.encode('utf-8'))

client = docker.APIClient(version='auto')
client.login(username='<user>', password='<pass>')

for l in client.build(fileobj=f, rm=True, tag='test', stream=True, pull=True):
  print(l)

This example will error saying that it failed to find the image in FROM. If you add the full registry:

client = docker.APIClient(version='auto')
client.login(username='<user>', password='<pass>', registry='https://index.docker.io/v1/')

It will succeed. If you leave off the trailing slash on the registry url, it will fail.

python 3.5.2
docker-py 2.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0