vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

Dockerfile Linter doesn't recognize directory destination in COPY command

Open SetTrend opened this issue 1 year ago • 5 comments

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:

Dockerfile linter error

Current Situation

The Dockerfile linter erroneously throws an error about a missing a trailing backslash although it has been provided.

Desired Situation

  1. 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.)
  2. A trailing backslash in the destination path portion of the command should correctly be recognized.
  3. The use of variables (ARG, ENV variables) 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:

Dockerfile example using variables

SetTrend avatar Apr 28 '24 23:04 SetTrend