devcontainers / devcontainers/cli

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

Đang mở
#969 7 bình luận 9 reaction 1 người được giao Được @chrmarti nhận Xem trên GitHub
bug
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ả

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.

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.