d-_-b
d-_-b

Reputation: 23171

Build and use a docker image without involving docker.io

I'm using docker build -t myimage:latest . and then have a separate Dockerfile using that base image:

FROM myimage:latest
...

But when I try to docker build . for that second Dockerfile, I'm getting an error as its trying to pull from docker.io

------
 > [internal] load metadata for docker.io/library/myimage:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Is there a way to build and tag images intended only for local use? I can see myImage when I search for it locally: docker image ls | grep myimage

Upvotes: 4

Views: 2810

Answers (1)

Ron van der Heijden
Ron van der Heijden

Reputation: 15070

This is probably due to the latest tag.

You could try another tag:

echo 'FROM busybox' > Dockerfile
docker build -t myimage:dev .

echo 'FROM myimage:dev' > Dockerfile
docker build .

Upvotes: 2

Related Questions