Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build command doesn't seem to find local images #667

Closed
hjwp opened this issue Jul 6, 2015 · 1 comment
Closed

build command doesn't seem to find local images #667

hjwp opened this issue Jul 6, 2015 · 1 comment

Comments

@hjwp
Copy link

hjwp commented Jul 6, 2015

To repro:

Build and tag an image locally:

mkdir test1
echo 'FROM ubuntu' >> test1/Dockerfile
echo 'RUN touch /etc/i_was_here' >> test1/Dockerfile
docker build -t me/my_new_image test1

Now let's create a dockerfile that builds from this new local image:

mkdir test2
echo 'FROM me/my_new_image' >> test2/Dockerfile
echo 'RUN touch /etc/i_was_here_too' >> test2/Dockerfile

Confirm it works:

docker build test2
Step 0 : FROM me/my_new_image
 ---> 0f31d2454ece
Step 1 : RUN touch /etc/i_was_here_too
 ---> Running in 890853da77b8
 ---> 0a0ffa637067
Removing intermediate container 890853da77b8
Successfully built 0a0ffa637067

Now try it using the docker-py build command:

python -c'from docker import Client; docker = Client(base_url="unix://var/run/docker.sock"); output = docker.build(path="/tmp/test2"); print("\n".join(output))'

gives

{"stream":"Step 0 : FROM me/my_new_image\n"}
{"status":"Pulling repository me/my_new_image"}
{"errorDetail":{"message":"Error: image me/my_new_image:latest not found"},"error":"Error: image me/my_new_image:latest not found"}

So it seems like, when run through docker-py, the build command isn't finding the local image??

@shin-
Copy link
Contributor

shin- commented Jul 6, 2015

#657 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants