in Dockerfile:
...
ARG BUILD_ARG1=23 \
BUILD_ARG2=42
...
renders following warning from dockerfile-utils: "ARG requires exactly one argument" albeit everything building and working as expected.
ENV:
Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:52:11.516Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 3.10.0-1160.11.1.el7.x86_64
I guess it's debatable; the spec for ARG implies (but doesn't overtly state) that it takes only one item, optionally with a default value.
ARG <name>[=<default value>]
As an example for multiple, it gives the following:
FROM busybox
ARG user1
ARG buildno
# ...
@rcjsuen what do you think?
@rcjsuen, do you think it's possible to make this dockerfile specification a little more flexible to include the user's ARG use case? The phrase "requires" makes it seem like their example won't run when it will.
First of all, thank you to @oberfoerster for the bug report and my apologies for the late response. Been flooded with GitHub notifications and I haven't yet gotten around to pruning things down so this fell through the cracks. :(
So, with regards to ARG instructions taking in multiple arguments, that is a new feature introduced by https://github.com/moby/buildkit/pull/1692 in the 20.10 release. I'll make the change in the language server so that this is no longer flagged as an error.
Cool, didn't know it was explicitly added as a new capability. Thanks!
Thank You!
Seems, I'm an early adopter then ;)
@oberfoerster I've opened #2866 to fix this.
Most helpful comment
First of all, thank you to @oberfoerster for the bug report and my apologies for the late response. Been flooded with GitHub notifications and I haven't yet gotten around to pruning things down so this fell through the cracks. :(
So, with regards to
ARGinstructions taking in multiple arguments, that is a new feature introduced by https://github.com/moby/buildkit/pull/1692 in the 20.10 release. I'll make the change in the language server so that this is no longer flagged as an error.