Docker Community Forums

Share and learn in the Docker community.

Building from source image hosted in private registry

(Leon Kyneur) #1

I’m trying to work out how to build images when using a private repo and sourcing each iteration from a parent container.

for example
FROM alpine:latest

I push both images to my registry just fine however when I build ‘’ on my CI server I get the following error:

docker build --rm -t .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon 
Step 0 : FROM
Pulling repository
Error: image project/base:latest not found

Am I sourcing my base image correctly? I don’t reference the short name anywhere however it attempts to build with it. If I pull the base image down to the CI server it’s fine, however not ideal since I would need to know which of my containers are build from which base images (as opposed to using FROM).

(Andy Rothfusz) #2

Have you run docker login on the machine doing the build? You didn’t say that you were pushing from the same machine as where you do the build.

And is there a :latest tag?

(Leon Kyneur) #3

@rufus thanks - I was missing the latest tag.

It seems I have to be specific about pushing with :latest to the registry for a tag to be created.