buildImage function
Implementation
Future<String> buildImage({
required String pathOrUrl,
List<String> options = const [],
})async{
List<String> argumentsList = [
'build',
pathOrUrl,
];
argumentsList.insertAll(1, options);
ProcessResult result = await Process.run(
dockerCommand,
argumentsList,
runInShell: true,
);
if(result.exitCode == 0){
return result.stdout;
}else{
throw result.stderr;
}
}