'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
Solution 1:[1]
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 .
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ron van der Heijden |
