devcontainers / devcontainers/cli

Add support for Dockerfile using a variable within their FROM line, today it fails due to usage of docker inspect not handling the ARG

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

説明

I have a Dockerfile that needs to use an ARG in the FROM line:

https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact

```
ARG VERSION=latest
FROM busybox:$VERSION
ARG VERSION
```

This works with docker build but fails with devcontainer because devcontainers try to build the FROM image name without honoring the ARG and call docker inspect which then return a failure.

```
[126 ms] @devcontainers/cli 0.52.1. Node.js v18.18.2. linux 5.15.0-86-generic x64.
{"outcome":"error","message":"Command failed: docker inspect --type image busybox:VERSION","description":"An error occurred building the container."}
```

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

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

評価

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

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

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