devcontainer build fails with authentication error
See original GitHub issueHi 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:
- Created a year ago
- Reactions:1
- Comments:14 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 withdocker build
.Another workaround is to not use
--no-cache
(--pull
is only added when that is set).Just tested CLI version 0.7.1. Works again, thanks for fixing! ❤️