pullImage function

Future<String> pullImage({
  1. required String imageName,
})

Download an image

Implementation

Future<String> pullImage({
  required String imageName,
})async{
  ProcessResult result = await Process.run(
    dockerCommand,
    [
      'pull',
      imageName,
    ],
    runInShell: true,
  );
  if(result.exitCode == 0){
    return result.stdout;
  }else{
    throw result.stderr;
  }
}