devcontainers / devcontainers/cli

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

オープン
#367 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
feature-request
主要言語
TypeScript
スター
3k
フォーク
457
平均マージ
13時間 17分
マージ済み PR(30日)
6

説明

## 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."}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。