devcontainers / devcontainers/cli

Building devcontainers does not use .dockerignore file next to the Dockerfile.

オープン
#969 コメント 7 件 リアクション 9 件 担当者 1 名 @chrmarti が担当を希望しています GitHub で見る
bug
主要言語
TypeScript
スター
3k
フォーク
457
平均マージ
13時間 17分
マージ済み PR(30日)
6

説明

Hi, is it possible that the .dockerignore file next to the Dockerfile is not being used to ignore files in the build context?

I used to think only the .dockerignore file in the root of the Docker build context was used and I know that it is not possible to specify another .dockerignore file using command line arguments (e.g. `-i path/to/.dockerignore`).
Then I read about this file naming workaround: [Filename and location](https://docs.docker.com/build/concepts/context/#filename-and-location).

This works fine when I use `docker compose build`, `docker buildx build`, and `docker buildx bake`.
However, opening in a container, this `Dockerfile.dockerignore` next to my `Dockerfile` is not being used, while the one in the root of my context is working.

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

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

評価

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

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

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