-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Proposal: recursive .dockerignore files #20944
Copy link
Copy link
Closed
Labels
area/builderBuildBuildkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shinystatus/claimed
Description
I can't find anything which relates to this, but it would be useful if .dockerignore files could exist in any directory, defining paths relative to themselves (like .gitignore).
Example:
Working dir
.
├── add-dir
│ ├── add-me
│ ├── .dockerignore
│ └── ignore-me
├── add-me
├── Dockerfile
├── .dockerignore
└── ignore-me
Dockerfile
FROM alpine
WORKDIR /workdir
COPY . .
CMD ls -Rboth .dockerignore files
ignore-me
Commands
$ docker build -t dockerignore-test .
$ docker run dockerignore-test
.:
Dockerfile
add-dir
add-me
./add-dir:
add-me
ignore-me # this file would not be inside the containerReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/builderBuildBuildkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shinystatus/claimed