microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.18k stars 508 forks source link

Offer completion for `# syntax=docker/dockerfile:1` #4333

Open segevfiner opened 2 days ago

segevfiner commented 2 days ago

The extension currently offers completion for # syntax syntax=docker/dockerfile:experimental, it would be nice if it would also offer # syntax=docker/dockerfile:1 as that is more recommended for general usage.

See https://docs.docker.com/reference/dockerfile/#syntax

rcjsuen commented 1 day ago

@segevfiner Could you clarify on the purpose of using docker/dockerfile:1? How is docker/dockerfile:1 different from not specifying the syntax directive at all? Does BUILDKIT_SYNTAX take precedence or does the directive take precedence?

segevfiner commented 1 day ago

If you don't specify syntax, it uses some builtin frontend version, which I'm not sure what features it supports, as in, what version is it.

BUILDKIT_SYNTAX is another way to use a different syntax and I'm not sure which takes precedence, I would assume the command line.

It's documented here as well: https://docs.docker.com/build/dockerfile/frontend/