-
Notifications
You must be signed in to change notification settings - Fork 280
devcontainer build fails with authentication error #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Similar issue here. It was fine last month (I rebuild the image every month)
|
Thanks for opening and for the feedback @fasmat and @fvelcker. It appears you're both using the I recently commented in #66 about using
Would you be able to try a |
Hi @bamurtaugh, I tried your suggestion: vscode ➜ /workspace $ npm i -g @devcontainers/cli
vscode ➜ /workspace $ devcontainer build --workspace-folder . --image-name local-env:latest --no-cache
[13 ms] @devcontainers/cli 0.6.0.
[1004 ms] Start: Run: docker-compose -f /workspace/.devcontainer/docker-compose.yml config
[1449 ms] services:
app:
build:
context: /workspace/.devcontainer
dockerfile: Dockerfile
command: sleep infinity
entrypoint: /usr/local/share/docker-init.sh
user: vscode
volumes:
- ~/.ssh:/home/vscode/.ssh:ro
- /var/run/docker.sock:/var/run/docker-host.sock:rw
- ..:/workspace:cached
version: '3'
[1461 ms] Preparing to parse declared features and fetch remote features.
[1461 ms] Detected local feature set. Continuing...
[1461 ms] Detected local feature set. Continuing...
[1461 ms] Detected local feature set. Continuing...
[1461 ms] Detected local feature set. Continuing...
[1461 ms] Detected local feature set. Continuing...
[1462 ms] Detected local feature set. Continuing...
[1462 ms] Detected local feature set. Continuing...
[1467 ms] local container features stored at: /usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@devcontainers/cli/dist/node_modules/vscode-dev-containers/container-features
[1468 ms] Start: Run: tar --no-same-owner -x -f -
[1529 ms] Start: Run: docker build -t dev_container_feature_content_temp -f /tmp/vsch/container-features/0.6.0-1656355510590/Dockerfile.buildContent /tmp/vsch/container-features/0.6.0-1656355510590
[+] Building 0.1s (5/5) FINISHED
=> [internal] load build definition from Dockerfile.buildContent 0.0s
=> => transferring dockerfile: 101B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 270.75kB 0.0s
=> CACHED [1/1] COPY . /tmp/build-features/ 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:4eef675b07d4033f3f26ad2437468d3e2070577593675 0.0s
=> => naming to docker.io/library/dev_container_feature_content_temp 0.0s
[1938 ms] Start: Run: docker-compose --project-name workspace_devcontainer -f /workspace/.devcontainer/docker-compose.yml -f /tmp/docker-compose/docker-compose.devcontainer.build-1656355511076.yml build --no-cache --pull app
Building app
[+] Building 1.4s (4/4) 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.2s
------
> [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
Error: Command failed: docker-compose --project-name workspace_devcontainer -f /workspace/.devcontainer/docker-compose.yml -f /tmp/docker-compose/docker-compose.devcontainer.build-1656355511076.yml build --no-cache --pull app
at buildAndExtendDockerCompose (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@devcontainers/cli/dist/spec-node/dockerCompose.js:259:66)
at async doBuild (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:311:13)
at async build (/usr/local/share/nvm/versions/node/v16.15.1/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:226:20)
{"outcome":"error","message":"Command failed: docker-compose --project-name workspace_devcontainer -f /workspace/.devcontainer/docker-compose.yml -f /tmp/docker-compose/docker-compose.devcontainer.build-1656355511076.yml build --no-cache --pull app","description":"An error occurred building the Docker Compose images."} I'm logged into Docker Hub and can pull images from there, but devcontainer keeps complaining it cannot authorize. As mentioned by @fvelcker this problem only occurred recently and the same command would not error a few weeks ago. |
@bamurtaugh Yes I did that before I raised the other question about what package to use.
Edit: Retried with v0.7.0 and same (I was hoping that PR #64 would get this fixed) |
Found this: microsoft/vscode-remote-release#6851 (comment). |
I see |
You could install BuildKit for your Docker install as a workaround. (If you already have BuildKit installed, let me know which version.)
|
Thanks for looking into it. |
Actually the workaround of using BuildKit will not work for Docker Compose at the moment (that won't switch to using Another workaround is to not use |
ah, well, good to know, I ended up with some issue with BuildKit, so I won't get further into that :) I am actually already using
|
Fixed in Remote-Containers 0.241.2-pre-release and Dev Containers CLI 0.7.1. (The workaround would be to not use |
Ah, I missed that keyword! Thanks for the fix, I'll try it now, would be a nice finish for the week |
That works perfectly now, thanks a lot |
Just tested CLI version 0.7.1. Works again, thanks for fixing! ❤️ |
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:
I'm logged into Docker hub and can pull other images with no problem. Any ideas what could be the issue here?
The text was updated successfully, but these errors were encountered: