question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

devcontainer build fails with authentication error

See original GitHub issue

Hi everyone,

I’ve been using the build feature of the devcontainer CLI before and didn’t have any issues until recently.

Now when I try to build my devcontainer configuration I receive the following error:

Building app
[+] Building 1.4s (5/5) FINISHED                                                
 => [internal] load build definition from Dockerfile-with-features         0.0s
 => => transferring dockerfile: 3.85kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => ERROR [internal] load metadata for docker.io/library/dev_container_fe  1.3s
 => [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/b  0.3s
 => [auth] library/dev_container_feature_content_temp:pull token for regi  0.0s
------
 > [internal] load metadata for docker.io/library/dev_container_feature_content_temp: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
ERROR: Service 'app' failed to build : Build failed
[4407 ms] Error: Command failed: docker-compose --project-name workspace_devcontainer -f /workspace/.devcontainer/docker-compose.yml -f /tmp/docker-compose/docker-compose.devcontainer.build-1655998380158.yml build --no-cache --pull app
[4407 ms]     at buildAndExtendDockerCompose (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@vscode/dev-container-cli/dist/spec-node/devContainersSpecCLI.js:19967:51)
[4407 ms]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[4407 ms]     at async doBuild (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@vscode/dev-container-cli/dist/spec-node/devContainersSpecCLI.js:21358:7)
[4407 ms]     at async build (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@vscode/dev-container-cli/dist/spec-node/devContainersSpecCLI.js:21269:18)
[4415 ms] Exit code 1

I’m logged into Docker hub and can pull other images with no problem. Any ideas what could be the issue here?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chrmarticommented, Jul 1, 2022

Actually the workaround of using BuildKit will not work for Docker Compose at the moment (that won’t switch to using buildx). Preparing a fix that will simply skip --pull when we use that temporary image with docker build.

Another workaround is to not use --no-cache (--pull is only added when that is set).

0reactions
fasmatcommented, Jul 3, 2022

Fixed in Remote-Containers 0.241.2-pre-release and Dev Containers CLI 0.7.1.

(The workaround would be to not use --no-cache.)

Just tested CLI version 0.7.1. Works again, thanks for fixing! ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dev Container 0.255.2 : Compose: Rebuild failed #7323
=> [auth] library/dev_container_feature_content_temp:pull token for regi 0.0s. [mamita-web internal] load metadata for docker.io/library/ ...
Read more >
docker - vscode devcontainer no longer builds: rpc error: code ...
The issue is the final line of the Dockerfile : # Create the user RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid...
Read more >
How to fix Server failed to authenticate the request on ...
I use DevContainer for developing Java Functions. However, when I start the Azure Functions I encounter this error. Server failed to authenticate the...
Read more >
Settings Sync in Visual Studio Code
If you experience a problem with Settings Sync, include this log when creating the issue. If your problem is related to authentication, also...
Read more >
Dev Container metadata reference
The devcontainer.json file contains any needed metadata and settings required ... command (since the container can shut down if the default command fails)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found