devcontainers / devcontainers/cli

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

Ouverte
#367 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
feature-request
Langage dominant
TypeScript
Étoiles
3k
Forks
457
Merge moyen
13 h 17 min
PR mergées (30 j)
6

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.