Skip to content

Support multiple .dockerignore files naming convention for language mode #4059

@thernstig

Description

@thernstig

https://docs.docker.com/build/building/context/#dockerignore states:

If you use multiple Dockerfiles, you can use different ignore-files for each Dockerfile. You do so using a special naming convention for the ignore-files. Place your ignore-file in the same directory as the Dockerfile, and prefix the ignore-file with the name of the Dockerfile.
.
├── index.ts
├── src/
├── docker
│ ├── build.Dockerfile
│ ├── build.Dockerfile.dockerignore
│ ├── lint.Dockerfile
│ ├── lint.Dockerfile.dockerignore
│ ├── test.Dockerfile
│ └── test.Dockerfile.dockerignore

Thus

vscode-docker/package.json

Lines 1559 to 1561 in ab0c8e3

"filenames": [
".dockerignore"
]
should be amended to support this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions