few-arm-93065
02/24/2022, 6:36 PMdocker_image(
name="python_base",
source="python/Dockerfile",
registries=["base_images"],
repository="python",
image_tags=["internal_build"],
skip_push=True
)
So this builds and tags base_images/python_base:internal_build
, and other docker_image targets have it as a pants dependency, and their dockerfiles start with FROM base_images/python_base:internal_build
. All of this worked, until I switched the python_base's source image, from FROM ubuntu:20.04
to FROM amd64/ubuntu:20.04
(I'm building on an M1 mac, and trying to force x86 virtualization in my images). Pants can still build python_base, but it can't build any images that depend on it, instead, docker tries to pull the image from docker.io:
#3 [internal] load metadata for <http://docker.io/base_images/python:internal_build|docker.io/base_images/python:internal_build>
#3 sha256:658dd15cabbf2cf418526dfa6c6ce44508d99eec32bbad5dcc6be686cbc57fe2
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
> [internal] load metadata for <http://docker.io/base_images/python:internal_build|docker.io/base_images/python:internal_build>:
------
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
However, I see can the image on my system:
> docker image ls | grep base_images/python
base_images/python internal_build 438b7f434621 54 minutes ago 328MB
And I can build the image that depends on base_images/python using a standard docker build
command, it has no problem finding the image. Any idea where I could look next?few-arm-93065
02/24/2022, 6:40 PMplatform
build parameter, that would also solve my problem - though I'm curious if you have any insight, I have no idea why it's behaving this way.curved-television-6568
02/24/2022, 9:15 PMFROM —platform=… base/image
if that makes any difference..?curved-television-6568
02/24/2022, 9:17 PMcurved-television-6568
02/24/2022, 9:19 PMfew-arm-93065
02/24/2022, 10:33 PMFROM -platform=
appears to fix that issue, too. So, thank you!curved-television-6568
02/25/2022, 7:48 AM