removeImage function

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

Remove image

Implementation

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