Search in sources :

Example 21 with DockerApi

use of org.springframework.boot.buildpack.platform.docker.DockerApi in project spring-boot by spring-projects.

the class ImageAssert method getLayers.

private void getLayers() throws IOException {
    new DockerApi().image().exportLayers(this.actual, (id, tarArchive) -> {
        Layer layer = Layer.fromTarArchive(tarArchive);
        this.layers.put(layer.getId().toString(), layer);
    });
}
Also used : DockerApi(org.springframework.boot.buildpack.platform.docker.DockerApi) Layer(org.springframework.boot.buildpack.platform.docker.type.Layer)

Aggregations

DockerApi (org.springframework.boot.buildpack.platform.docker.DockerApi)21 Image (org.springframework.boot.buildpack.platform.docker.type.Image)17 Test (org.junit.jupiter.api.Test)15 ImageArchive (org.springframework.boot.buildpack.platform.docker.type.ImageArchive)10 DockerConfiguration (org.springframework.boot.buildpack.platform.docker.configuration.DockerConfiguration)4 ContainerApi (org.springframework.boot.buildpack.platform.docker.DockerApi.ContainerApi)3 ImageApi (org.springframework.boot.buildpack.platform.docker.DockerApi.ImageApi)3 VolumeApi (org.springframework.boot.buildpack.platform.docker.DockerApi.VolumeApi)3 TestTemplate (org.junit.jupiter.api.TestTemplate)2 ContainerReference (org.springframework.boot.buildpack.platform.docker.type.ContainerReference)2 ImageReference (org.springframework.boot.buildpack.platform.docker.type.ImageReference)2 URI (java.net.URI)1 BuildResult (org.gradle.testkit.runner.BuildResult)1 DockerEngineException (org.springframework.boot.buildpack.platform.docker.transport.DockerEngineException)1 Layer (org.springframework.boot.buildpack.platform.docker.type.Layer)1