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
I need to edit Dockerfiles in a Javascript application. This library enables to parse the Dockerfiles, but I do not know, how to update the arguments.
E.g. I can get the argument for the 'FROM' instruction:
for (let instruction of instructions) {
if (instruction.getInstruction() === 'FROM') {
console.log(instruction.getArgumentsContent()); // 'ubuntu'
}
}
How can I change the instruction 'FROM ubuntu' to 'FROM debian'?
And will then the method 'dockerfile.document.getText()' return the updated Dockerfile or the original? I need to be able to generate an updated Dockerfile.
Thanks.
The text was updated successfully, but these errors were encountered:
I need to edit Dockerfiles in a Javascript application. This library enables to parse the Dockerfiles, but I do not know, how to update the arguments.
E.g. I can get the argument for the 'FROM' instruction:
How can I change the instruction 'FROM ubuntu' to 'FROM debian'?
And will then the method 'dockerfile.document.getText()' return the updated Dockerfile or the original? I need to be able to generate an updated Dockerfile.
Thanks.
The text was updated successfully, but these errors were encountered: