You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The variable resolution code currently always scopes itself to the build stage that the instruction is in. However, in the case of a FROM, it needs to try to resolve itself with the ARG variables that are defined at the beginning of the dockerfile.
import{DockerfileParser}from'dockerfile-ast';constcontent=`ARG tag=8FROM node:$tag`letdockerfile=DockerfileParser.parse(content);letvariables=dockerfile.getAvailableVariables(1);// this will print out undefined instead of 8console.log(dockerfile.resolveVariable("tag",1));
The text was updated successfully, but these errors were encountered:
The variable resolution code currently always scopes itself to the build stage that the instruction is in. However, in the case of a
FROM
, it needs to try to resolve itself with theARG
variables that are defined at the beginning of the dockerfile.The text was updated successfully, but these errors were encountered: