Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile's getAvailableVariables(number) doesn't consider the initial ARGs #18

Closed
rcjsuen opened this issue Feb 10, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Feb 10, 2018

import { DockerfileParser } from 'dockerfile-ast';

const content =
`ARG tag=8
FROM node:`

let dockerfile = DockerfileParser.parse(content);
let variables = dockerfile.getAvailableVariables(1);
console.log(variables.length);
0

Given a Dockerfile that has initial ARG instructions defined to be used in subsequent FROM instructions, calling Dockerfile's getAvailableVariables(number) function on a line with FROM should return the initial ARG instructions' variables.

@rcjsuen rcjsuen added the bug label Feb 10, 2018
@rcjsuen rcjsuen self-assigned this Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant