devcontainers / devcontainers/features
Unable to install java feacture Maven...pull access denied
- Lenguaje dominante
- Shell
- Estrellas
- 1.5k
- Forks
- 621
- Merge medio
- 6 d 53 min
- PR fusionados (30 d)
- 9
Descripción
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?
Guía de contribución
Línea de trabajo
No se nombra ningún archivo del repositorio ni ninguna prueba. Empieza reproduciendo la configuración de .devcontainer/devcontainer.json y Dockerfile con el comando Docker buildx indicado y, después, sigue la resolución de la feature de Java que produce el pull denegado. El trabajo estará terminado cuando se identifique si el fallo lo causa la configuración, la resolución de la feature o el acceso al registro, y se documente una corrección reproducible.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, java
- Área
- build-system, devops
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100