devcontainers / devcontainers/cli

Support docker-compose build with a `git` remote path as build.context

Đang mở
#367 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
feature-request
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ả

## Problem
Devcontainer-cli failed to build container with build context pointing to remote path (in this case, git).

sample docker-compose.yml:
```yml
version: '3.9'
services:
workspace:
build:
context: https://my-private-repo/devcontainer.git
dockerfile: jdk.dockerfile
target: jdk15-mvn38-node14
command: sleep infinity
volumes:
- ..:/workspace
```

This `docker-compose.yml` built correctly when using `docker compose` but failed when using `devcontainer-cli build`

## Version

devcontainer@0.27.1 /home/pingu/.nvm/versions/node/v14.21.2/lib/node_modules/@devcontainers/cli

## Log file
```log
pingu@XXXXXX:~/repo/vsnotes/.devcontainer$ devcontainer build --workspace-folder ..
[10 ms] @devcontainers/cli 0.27.1. Node.js v14.21.2. linux 5.10.102.1-microsoft-standard-WSL2 x64.
[273 ms] Start: Run: docker-compose -f /home/pingu/repo/vsnotes/.devcontainer/docker-compose.yml --profile * config
[359 ms] name: devcontainer
services:
workspace:
build:
context: https://my-private-repo/devcontainer.git
dockerfile: jdk.dockerfile
target: jdk15-mvn38-node14
command:
- sleep
- infinity
networks:
default: null
volumes:
- type: bind
source: /home/pingu/repo/vsnotes
target: /workspace
bind:
create_host_path: true
networks:
default:
name: devcontainer_default
Error: ENOENT: no such file or directory, open '/home/pingu/repo/vsnotes/.devcontainer/https:/my-private-repo/devcontainer.git/jdk.dockerfile'
{"outcome":"error","message":"ENOENT: no such file or directory, open '/home/pingu/repo/vsnotes/.devcontainer/https:/my-private-repo/devcontainer.git/jdk.dockerfile'","description":"An error occurred building the container."}
```

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.