devcontainers / devcontainers/features

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

Đang mở
#784 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
1.5k
Fork
622
Merge trung bình
6 ngày 53 phút
Pull request đã merge (30 ngày)
9

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Không có tệp nào trong repository hoặc test nào được nêu tên. Hãy bắt đầu bằng cách tái hiện cấu hình từ .devcontainer/devcontainer.json và Dockerfile bằng lệnh Docker buildx đã được báo cáo, sau đó truy vết quá trình phân giải Java feature tạo ra pull bị từ chối. Hoàn tất có nghĩa là xác định liệu lỗi có phải do cấu hình, quá trình phân giải feature hay quyền truy cập registry gây ra, đồng thời ghi lại một bản sửa có thể tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, java
Lĩnh vực
build-system, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.