This is a simple set of classes for parsing and generating Dockerfiles
varinstructions=newList<Instruction>();instructions.Add(newInstruction("FROM","debian:9"));instructions.Add(newInstruction("RUN"," apt-get update && apt-get install libunwind8 libicu57"));instructions.Add(newInstruction("COPY",string.Format("* /exe/",dir)));instructions.Add(newInstruction("CMD",string.Format("/exe/{0} {1}",exe,getArgs(args))));vardf=newDockerfile(instructions.ToArray(),newComment[0]);File.WriteAllText(dir+"/Dockerfile",df.Contents());vardf=Dockerfile.Parse(newTextReader("Dockerfile"));
...Probably. File issues.
dotnet add package Dockerfile --version 1.0.0