Docker.io/library/base:latest: pull access denied

Seemingly out of nothing (meaning that it still worked just today), at one point the build-container-torizon-release-arm64 task stopped building without any significant changes to the build:

Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg GPU=-am62 my-torizon-builder 

WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.
[+] Building 1.2s (5/5) FINISHED                                                           docker:default
 => [my-torizon-builder internal] load build definition from Dockerfile                              0.0s
 => => transferring dockerfile: 4.33kB                                                               0.0s
 => ERROR [my-torizon-builder internal] load metadata for docker.io/library/base:latest              1.0s
 => [my-torizon-builder internal] load metadata for docker.io/torizon/debian:next-rc                 0.8s
 => [my-torizon-builder internal] load metadata for docker.io/torizon/cross-toolchain-arm64:next-rc  0.6s
 => [my-torizon-builder auth] library/base:pull token for registry-1.docker.io                       0.0s
------
 > [my-torizon-builder internal] load metadata for docker.io/library/base:latest:
------
failed to solve: base: failed to resolve source metadata for docker.io/library/base:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

What is that image? Is this some “internal” layer? How could I debug this?

What I tried:

  • created a dockerhub account and ran docker login successfully
  • tried pulling the docker.io/library/base:latest image manually in terminal: same error message
  • added --no-cache to docker build compose
  • ran docker prune --all --force locally to remove all containers

Nothing helped. Any more ideas?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! I see you’re encountering an issue where your Torizon container build is failing due to this error:

failed to solve: base: failed to resolve source metadata for docker.io/library/base:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

This error occurs because docker.io/library/base:latest is not a valid image on Docker Hub and is not intended as a base image for Torizon containers. The Dockerfile is attempting to use a non-existent image, which explains why manual pulls also fail.

What should the base image be?
For Torizon applications, you should use the official Toradex Debian-based images designed for TorizonCore. For ARM64 targets, update your Dockerfile’s base image to:

FROM --platform=linux/arm64 torizon/debian:3-bookworm

Steps to resolve the error:

  1. Edit your Dockerfile:
    Replace any line that starts with FROM base or FROM docker.io/library/base:latest with the recommended Toradex image above.

  2. Check your environment settings:
    The warning:

    The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string.
    

    suggests your LOCAL_REGISTRY environment variable is not set. While this usually does not stop the build, it’s good practice to set it if you use a local container registry (source).

  3. Clean up build cache and re-run the build:
    After editing the Dockerfile, you can use docker compose build --no-cache again to ensure old cache does not interfere.

  4. Verify your Dockerfile:
    If you’re still experiencing problems, please post the relevant section of your Dockerfile for additional review.

Summary:
This issue likely surfaced now because you previously had the incorrect base image cached locally, and only now did this problem appear due to a cache clear or other change. Using the correct Toradex base image should resolve the error.

For more details, you can refer to the Torizon OS architecture documentation:

Best regards,
Toradex AI Assistant.

As noted by the AI, perhaps the issue surfaced after I added the --no-cache to docker compose build. However, I am able to pull cross-toolchain and debian images just fine…

Greetings @vilchanskyio,

To help investigate the issue could you share the following information:

  • What template is your project based upon?
  • What version of the Torizon IDE extension do you have installed currently?
  • Does this issue happen when you try to execute build-container-torizon-release-arm64 on a fresh project using the same template, or does it only happen when executing this task on your project with your code?
  • Are you on a Windows or Linux PC with VSCode?

Just want to make sure we have all the details before we try to investigate or reproduce this ourselves.

Best Regards,
Jeremias

My software stack is:

  • Fedora Linux 41
  • VSCode 1.100.2
  • Torizon IDE Extension 3.1.100 (I am using a pre-release version, because release did not work for me initially a few weeks ago)
  • Docker Engine (docker-ce) 28.2.2

I also installed apt and dpkg-related utilities, which (I assume) are wrappers around dnf on Fedora, just for the xonsh scripts not to hard fail when the command is not found.


When starting afresh (creating a new project from a template), the CMake C/C++ “hello world” template builds and deploys successfully (via build-container-torizon-release-arm64):

...
Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg GPU=-am62 test-project-container 

WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.
[+] Building 25.6s (20/20) FINISHED                                                                                                                                                                                        docker:default
 => [test-project-container internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 2.50kB                                                                                                                                                                                               0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG torizon/cross-toolchain-${IMAGE_ARCH}:${CROSS_SDK_BASE_TAG} results in empty or invalid base image name (line 15)                                                           0.0s
 => [test-project-container internal] load metadata for docker.io/torizon/debian:4                                                                                                                                                   1.4s
 => [test-project-container internal] load metadata for docker.io/torizon/cross-toolchain-arm64:4                                                                                                                                    2.3s
 => [test-project-container auth] torizon/debian:pull token for registry-1.docker.io                                                                                                                                                 0.0s
 => [test-project-container auth] torizon/cross-toolchain-arm64:pull token for registry-1.docker.io                                                                                                                                  0.0s
 => [test-project-container internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 115B                                                                                                                                                                                                    0.0s
 => [test-project-container build 1/7] FROM docker.io/torizon/cross-toolchain-arm64:4@sha256:75f54951109caff8472c462594d1deae460c183d7aa3b7eab1bf71323b85b1e8                                                                       12.6s
 => => resolve docker.io/torizon/cross-toolchain-arm64:4@sha256:75f54951109caff8472c462594d1deae460c183d7aa3b7eab1bf71323b85b1e8                                                                                                     0.1s
 => => sha256:27e2daccb73bc92a1ee43646de13cac88501185d9f358f22eda3f82445694b43 3.51kB / 3.51kB                                                                                                                                       0.0s
 => => sha256:75f54951109caff8472c462594d1deae460c183d7aa3b7eab1bf71323b85b1e8 1.61kB / 1.61kB                                                                                                                                       0.0s
 => => sha256:fabae76017d011f088543546c75b1377ab3a2526d075ab00919e1ede0606b83d 9.50kB / 9.50kB                                                                                                                                       0.0s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                                                             0.5s
 => => sha256:b1b720b4a1d97ec509012bae116e7894f253cf46af0f1dd890d23e4266382c23 0B / 636B                                                                                                                                            23.0s
 => => sha256:dad67da3f26bce15939543965e09c4059533b025f707aad72ed3d3f3a09c66f8 28.23MB / 28.23MB                                                                                                                                     1.9s
 => => sha256:2dec214a3bd3ffb236fa61624711a7168f04d2afd0a861509b332ad57747c13d 6.55MB / 6.55MB                                                                                                                                       3.9s
 => => extracting sha256:dad67da3f26bce15939543965e09c4059533b025f707aad72ed3d3f3a09c66f8                                                                                                                                            0.5s
 => => sha256:5697ad4d1033fca9f0148f386f1376ba24d70076ce6576c9448206e1eaeda1e5 268B / 268B                                                                                                                                           3.2s
 => => sha256:9edb0840aa685b6a1b661d7d0f40cd204cbf1a2fb7391950631fa14c3b822861 256B / 256B                                                                                                                                           3.2s
 => => sha256:c9a394f5c120cba8bf46bf60e324c0732f1e6c23850b28ed4d46e58ddbf92a5b 3.44kB / 3.44kB                                                                                                                                       4.1s
 => => sha256:6562e11b49b1e8e4fa75a9ad6057d32c0b6725355954efc97579ba1622220b60 1.97kB / 1.97kB                                                                                                                                       4.3s
 => => extracting sha256:2dec214a3bd3ffb236fa61624711a7168f04d2afd0a861509b332ad57747c13d                                                                                                                                            0.1s
 => => sha256:9fc9e985533f598dd13ba759945965df9e4c7de6e80dcfde8e413f417f0445af 406B / 406B                                                                                                                                           4.9s
 => => extracting sha256:5697ad4d1033fca9f0148f386f1376ba24d70076ce6576c9448206e1eaeda1e5                                                                                                                                            0.0s
 => => sha256:4679bf9521b81cf0a619a79d104597419835b7b4459e77de679fbe512c00a0f0 15.21MB / 15.21MB                                                                                                                                     7.0s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                                            0.0s
 => => extracting sha256:9edb0840aa685b6a1b661d7d0f40cd204cbf1a2fb7391950631fa14c3b822861                                                                                                                                            0.0s
 => => extracting sha256:b1b720b4a1d97ec509012bae116e7894f253cf46af0f1dd890d23e4266382c23                                                                                                                                            0.0s
 => => sha256:3bab3bd6f50e3be6e8f6a40f061f7f44f5c8e5e842496a846f4bd94b7d112616 1.18MB / 1.18MB                                                                                                                                       5.3s
 => => extracting sha256:c9a394f5c120cba8bf46bf60e324c0732f1e6c23850b28ed4d46e58ddbf92a5b                                                                                                                                            0.0s
 => => extracting sha256:6562e11b49b1e8e4fa75a9ad6057d32c0b6725355954efc97579ba1622220b60                                                                                                                                            0.0s
 => => extracting sha256:9fc9e985533f598dd13ba759945965df9e4c7de6e80dcfde8e413f417f0445af                                                                                                                                            0.0s
 => => sha256:85d251d1f4e84bdaa9cf94413034ad29d2c167b2f4400bf7383526e621bbc70c 172B / 172B                                                                                                                                           5.8s
 => => sha256:99e35793ce659a42171f8faef00dffa62bbb1cde3d4a78d150c03845c679d790 185B / 185B                                                                                                                                           6.1s
 => => sha256:b4b16cb46c1e2a676ff49d2de6c3001ac24fc8a8d5f4ffd6e3c81cb53e5d9675 135.31MB / 135.31MB                                                                                                                                  10.3s
 => => extracting sha256:4679bf9521b81cf0a619a79d104597419835b7b4459e77de679fbe512c00a0f0                                                                                                                                            0.1s
 => => extracting sha256:3bab3bd6f50e3be6e8f6a40f061f7f44f5c8e5e842496a846f4bd94b7d112616                                                                                                                                            0.0s
 => => extracting sha256:85d251d1f4e84bdaa9cf94413034ad29d2c167b2f4400bf7383526e621bbc70c                                                                                                                                            0.0s
 => => extracting sha256:99e35793ce659a42171f8faef00dffa62bbb1cde3d4a78d150c03845c679d790                                                                                                                                            0.0s
 => => extracting sha256:b4b16cb46c1e2a676ff49d2de6c3001ac24fc8a8d5f4ffd6e3c81cb53e5d9675                                                                                                                                            1.6s
 => [test-project-container internal] load build context                                                                                                                                                                             0.1s
 => => transferring context: 196.03kB                                                                                                                                                                                                0.0s
 => [test-project-container deploy 1/4] FROM docker.io/torizon/debian:4@sha256:89e87a5ad78b8b7741e7209cab96fabdea1893bffe06b036ff3368d2e64063de                                                                                      2.8s
 => => resolve docker.io/torizon/debian:4@sha256:89e87a5ad78b8b7741e7209cab96fabdea1893bffe06b036ff3368d2e64063de                                                                                                                    0.0s
 => => sha256:22f6a2d6b7d90f792f9cea03a005f84908f258bc72f171e1cfdf7c7350da85e8 268B / 268B                                                                                                                                           0.4s
 => => sha256:6382f28343bdf148663bde65500f9df4d63786602b77aeabfb6380446f468082 6.48kB / 6.48kB                                                                                                                                       0.0s
 => => sha256:34ef2a75627f6089e01995bfd3b3786509bbdc7cfb4dbc804b642e195340dbc9 28.08MB / 28.08MB                                                                                                                                     0.5s
 => => sha256:48eaa8f873527b62c792d606ccde1979aeef95165e42a39d96c94e4604433ee8 2.56kB / 2.56kB                                                                                                                                       0.0s
 => => sha256:e406c0e2542c1395a942d059075c891120a07c3f3c0968b169221804f4fe9df6 6.33MB / 6.33MB                                                                                                                                       0.6s
 => => sha256:89e87a5ad78b8b7741e7209cab96fabdea1893bffe06b036ff3368d2e64063de 2.38kB / 2.38kB                                                                                                                                       0.0s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                                                             0.6s
 => => extracting sha256:34ef2a75627f6089e01995bfd3b3786509bbdc7cfb4dbc804b642e195340dbc9                                                                                                                                            0.6s
 => => sha256:573ba2e99d63572b20f7d7aa4df3e99df663421fa0e24c64c38b5a6eb8a25433 256B / 256B                                                                                                                                           1.4s
 => => sha256:d3c29788a7c5235d0790c4d043b015601b7ab14cbc354aa1267e8b146fa34e5d 3.44kB / 3.44kB                                                                                                                                       0.9s
 => => sha256:b1b720b4a1d97ec509012bae116e7894f253cf46af0f1dd890d23e4266382c23 636B / 636B                                                                                                                                           0.7s
 => => sha256:9bb49aeb75d7274c4857688795a1596dad13ed31737c829c424ab8e2a9034c9e 1.98kB / 1.98kB                                                                                                                                       0.9s
 => => sha256:41d0fe4d7bbf44cce23a3c27e525c69240eb49ccb88f14fdd8a6dbfb45386de5 15.05MB / 15.05MB                                                                                                                                     1.4s
 => => sha256:bf01af6e6be69b69603ebe6ed4f7ce52fce62cb2268adc9459c87af0690172f4 406B / 406B                                                                                                                                           1.1s
 => => sha256:8effd89b2d8528d1d46fa90637abf7d85bd09213ee383a70e6847f410d0899df 1.21MB / 1.21MB                                                                                                                                       1.4s
 => => extracting sha256:e406c0e2542c1395a942d059075c891120a07c3f3c0968b169221804f4fe9df6                                                                                                                                            0.1s
 => => extracting sha256:22f6a2d6b7d90f792f9cea03a005f84908f258bc72f171e1cfdf7c7350da85e8                                                                                                                                            0.0s
 => => sha256:7b7f3ff35c6306713c9acf0cea647e86fb4b2e27181568cd60c88edc7cb57a57 172B / 172B                                                                                                                                           2.2s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                                            0.0s
 => => extracting sha256:573ba2e99d63572b20f7d7aa4df3e99df663421fa0e24c64c38b5a6eb8a25433                                                                                                                                            0.0s
 => => extracting sha256:b1b720b4a1d97ec509012bae116e7894f253cf46af0f1dd890d23e4266382c23                                                                                                                                            0.0s
 => => extracting sha256:d3c29788a7c5235d0790c4d043b015601b7ab14cbc354aa1267e8b146fa34e5d                                                                                                                                            0.0s
 => => extracting sha256:9bb49aeb75d7274c4857688795a1596dad13ed31737c829c424ab8e2a9034c9e                                                                                                                                            0.0s
 => => extracting sha256:bf01af6e6be69b69603ebe6ed4f7ce52fce62cb2268adc9459c87af0690172f4                                                                                                                                            0.0s
 => => extracting sha256:41d0fe4d7bbf44cce23a3c27e525c69240eb49ccb88f14fdd8a6dbfb45386de5                                                                                                                                            0.1s
 => => extracting sha256:8effd89b2d8528d1d46fa90637abf7d85bd09213ee383a70e6847f410d0899df                                                                                                                                            0.0s
 => => extracting sha256:7b7f3ff35c6306713c9acf0cea647e86fb4b2e27181568cd60c88edc7cb57a57                                                                                                                                            0.0s
 => [test-project-container deploy 2/4] RUN apt-get -y update && apt-get install -y --no-install-recommends  && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*                                                  15.7s
 => [test-project-container build 2/7] RUN apt-get -q -y update &&     apt-get -q -y install     cmake     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*                                             8.3s
 => [test-project-container build 3/7] COPY . /home/torizon/app                                                                                                                                                                      0.1s
 => [test-project-container build 4/7] WORKDIR /home/torizon/app                                                                                                                                                                     0.1s
 => [test-project-container build 5/7] RUN rm -rf /home/torizon/app/build-arm64                                                                                                                                                      0.3s
 => [test-project-container build 6/7] RUN if [ "arm64" = "arm64" ] ; then         cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -Bbuild-arm64 ;     elif [   0.6s
 => [test-project-container build 7/7] RUN cmake --build build-arm64                                                                                                                                                                 0.7s
 => [test-project-container deploy 3/4] COPY --from=build /home/torizon/app/build-arm64/bin /home/torizon/app                                                                                                                        0.1s
 => [test-project-container deploy 4/4] WORKDIR /home/torizon/app                                                                                                                                                                    0.1s
 => [test-project-container] exporting to image                                                                                                                                                                                      0.2s
 => => exporting layers                                                                                                                                                                                                              0.1s
 => => writing image sha256:b2a8227d0444266c8dd4eddbf840a0882a30aacde63fa4c724e0a7cd180a58e5                                                                                                                                         0.0s
 => => naming to localhost:5002/test-project-container:v0.0.0                                                                                                                                                                        0.0s
 => [test-project-container] resolving provenance for metadata file                                                                                                                                                                  0.0s
[+] Building 1/1
 ✔ test-project-container  Built                                                                   

I also noticed that the log doesn’t contain any mention of docker.io/library/base:latest. I then also added the --no-cache argument to the task and again, docker compose built just fine. Weird…

I guess the only choice is starting from a fresh template. I will get back to you with an update.

Thank you for your time, it was an error on my side. I accidentally wrote COPY --from=base instead of COPY --from=build, but obviously I had no base layer.

But the Docker error was quite confusing and it could have also pointed me to a particular line…

I accidentally wrote COPY --from=base instead of COPY --from=build, but obviously I had no base layer.

Ahh I see, you must have modified the Dockerfile then by accident. In any case glad to see your issue was resolved.

Best Regards,
Jeremias