remove method
Removes the image from the local Docker image cache.
Has no effect if cleanUp is false or if build was never called.
Parameters:
force— forces removal even if the image is referenced by stopped containers. Defaults totrue.noPrune— whentrue, parent images are not removed. Defaults tofalse.
Implementation
Future<void> remove({bool force = true, bool noPrune = false}) async {
final imageId = _imageId;
if (imageId != null && cleanUp) {
await _dockerClient.removeImage(
imageId,
force: force,
noPrune: noPrune,
);
}
}