devcontainers / devcontainers/features

Unable to install java feacture Maven...pull access denied

Ouverte
#784 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Shell
Étoiles
1.5k
Forks
621
Merge moyen
6 j 53 min
PR mergées (30 j)
9

Description

I have the following iin my devcontainer.json:

```
"build": { "dockerfile": "Dockerfile" },

"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "false"
}
},
```

My docker file looks like this:

```
FROM amazonlinux:2023
...
RUN dnf -y install java-1.8.0-amazon-corretto
...

```

The devcontainer build fails with the following:
```
2023-12-12T20:56:29.828Z] [+] Building 0.1s (4/4) FINISHED
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 3.55kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/dev_container_fe 0.0s
=> CANCELED [internal] load metadata for docker.io/library/amazonlinux:2 0.0s
------
> [internal] load metadata for docker.io/library/dev_container_feature_content_temp:latest:
------
ERROR: failed to solve: rpc error: code = Unknown desc = 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
[2023-12-12T20:56:29.832Z] Stop (267 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-devuser1/container-features/0.54.2-1702414589038/Dockerfile-with-features -t vsc-tss_dataservice-acd411462c8d26d73f4d516b44eff63a0078f3cd6ca4ec27677f33b0de3594ae --target dev_containers_target_stage --no-cache --pull --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=devuser1 --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/devuser1/projects/tss_dataservice/.devcontainer
[2023-12-12T20:56:30.083Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-devuser1/container-features/0.54.2-1702414589038/Dockerfile-with-features -t vsc-tss_dataservice-acd411462c8d26d73f4d516b44eff63a0078f3cd6ca4ec27677f33b0de3594ae --target dev_containers_target_stage --no-cache --pull --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=devuser1 --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/devuser1/projects/tss_dataservice/.devcontainer
[2023-12-12T20:56:30.083Z] at Y$ (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:463:1860)
[2023-12-12T20:56:30.084Z] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-12-12T20:56:30.084Z] at async Fw (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:462:1831)
[2023-12-12T20:56:30.084Z] at async $J (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:462:608)
[2023-12-12T20:56:30.084Z] at async tAA (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:479:3660)
[2023-12-12T20:56:30.084Z] at async CC (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[2023-12-12T20:56:30.084Z] at async NeA (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:612:11107)
[2023-12-12T20:56:30.084Z] at async MeA (/home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js:612:10848)
[2023-12-12T20:56:30.088Z] Stop (1251 ms): Run: /home/devuser1/.vscode-remote-containers/bin/02b90714767f05c734ac29a64d0e5b4768f532d8/node /home/devuser1/.vscode-remote-containers/dist/dev-containers-cli-0.328.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-648534a2-d4a6-43ca-bcb2-8598ac1deddc1702414584376 --workspace-folder /home/devuser1/projects/tss_dataservice --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/devuser1/projects/tss_dataservice --id-label devcontainer.config_file=/home/devuser1/projects/tss_dataservice/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/devuser1/projects/tss_dataservice/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
```

Any ideas on how to solve this?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Aucun fichier du dépôt ni aucun test n’est nommé. Commencez par reproduire la configuration de .devcontainer/devcontainer.json et Dockerfile avec la commande Docker buildx signalée, puis suivez la résolution de la feature Java qui produit le pull refusé. Le travail est terminé lorsqu’il est identifié si l’échec est dû à la configuration, à la résolution de la feature ou à l’accès au registre, et qu’une correction reproductible est documentée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, java
Domaine
build-system, devops
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.