devcontainers / devcontainers/cli

devcontainer build with --push true failed when use image property

Đang mở
#370 7 bình luận 0 reaction 1 người được giao Được @chrmarti nhận Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
3k
Fork
457
Merge trung bình
13 giờ 17 phút
Pull request đã merge (30 ngày)
6

Mô tả

**devcontainer version**: `0.27.1`

#### devcontainer.json with image property

```json
{
"name": "kaitian-devcontainer",
"image": "mcr.microsoft.com/devcontainers/javascript-node:14",
"features": {
"ghcr.io/stickmy/merchant-legacy-dev-features/kaitian:1.0.1": {}
}
}
```

#### command

```bash
devcontainer build --workspace-folder . --image-name ghcr.io/stickmy/kaitian-devcontainer:1.0.0 --push true
```
The error message:
```
=> ERROR pushing vsc-kaitian-devcontainer-27da8ffe3eebb26605196a518a9f1f

ERROR: denied: requested access to the resource is denied
{"outcome":"error","message":"Command failed: docker buildx build --push --build-context dev_containers_feature_content_source=/var/folders/3n/0hqblg7d3mq2q0nlzkj31pgr0000gp/T/devcontainercli/container-features/0.27.1-1673115040210 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:14 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-kaitian-devcontainer-27da8ffe3eebb26605196a518a9f1f22-features -f /var/folders/3n/0hqblg7d3mq2q0nlzkj31pgr0000gp/T/devcontainercli/container-features/0.27.1-1673115040210/Dockerfile.extended /var/folders/3n/0hqblg7d3mq2q0nlzkj31pgr0000gp/T/devcontainercli/empty-folder","description":"An error occurred building the container."}
```

But the build works with `build` property

```json
{
"name": "kaitian-devcontainer",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "14"
}
},
"features": {
"ghcr.io/stickmy/merchant-legacy-dev-features/kaitian:1.0.1": {}
}
}
```

**Dockerfile**

```
ARG VARIANT="14"
FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT}
```

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

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

Đánh giá

Issue này chưa được đánh giá.

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.