microsoft / microsoft/vscode-containers
Dockerfile Linter doesn't recognize directory destination in COPY command
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 139
- Forks
- 87
- Avg merge
- 9h 15m
- Merged PRs (30d)
- 9
Description
Synopsis
Although I correctly added a backslash to the destination of my COPY commands, the Dockerfile linter throws an error claiming that I didn't:
Current Situation
The Dockerfile linter erroneously throws an error about a missing a trailing backslash although it has been provided.
Desired Situation
- A trailing backslash should only be required for the destination path if the source is not a single file.
(For paths containing spaces, the array syntax is mandatory.) - A trailing backslash in the destination path portion of the command should correctly be recognized.
- The use of variables (
ARG,ENVvariables) should be correctly parsed and interpreted.
VS Code Docker Extension Version
v1.29.0
Dockerfile Example Using Variables
The same Dockerfile as above, this time using variables for destination:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Dockerfile linter in the VS Code Containers extension and reproduce the reported COPY cases, including directory destinations, trailing backslashes, and ARG or ENV variables. Done means the linter distinguishes single-file and multi-source destinations and correctly recognizes destination backslashes and variable-based paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100