consumeStream(deleteImageStream, false);
assertNull(api().inspectImage(image.getId()));
}
public void testBuildImage() throws IOException, InterruptedException, URISyntaxException {
BuildOptions options = BuildOptions.Builder.tag("testBuildImage").verbose(false).nocache(false);
InputStream buildImageStream = api().build(new File(Resources.getResource("Dockerfile").toURI()), options);
String buildStream = consumeStream(buildImageStream, false);
Iterable<String> splitted = Splitter.on("\n").split(buildStream.replace("\r", "").trim());
String lastStreamedLine = Iterables.getLast(splitted).trim();
String rawImageId = Iterables.getLast(Splitter.on("Successfully built ").split(lastStreamedLine));