Search in sources :

Example 1 with BuildParam

use of com.spotify.docker.client.DockerClient.BuildParam in project docker-client by spotify.

the class DefaultDockerClientTest method testBuildImageIdWithBuildargs.

@Test
public void testBuildImageIdWithBuildargs() throws Exception {
    requireDockerApiVersionAtLeast("1.21", "build args");
    final Path dockerDirectory = getResource("dockerDirectoryWithBuildargs");
    final String buildargs = "{\"testargument\":\"22-12-2015\"}";
    final BuildParam buildParam = BuildParam.create("buildargs", URLEncoder.encode(buildargs, "UTF-8"));
    sut.build(dockerDirectory, "test-buildargs", buildParam);
}
Also used : Path(java.nio.file.Path) BuildParam(com.spotify.docker.client.DockerClient.BuildParam) Long.toHexString(java.lang.Long.toHexString) Matchers.isEmptyOrNullString(org.hamcrest.Matchers.isEmptyOrNullString) Matchers.containsString(org.hamcrest.Matchers.containsString) Test(org.junit.Test)

Aggregations

BuildParam (com.spotify.docker.client.DockerClient.BuildParam)1 Long.toHexString (java.lang.Long.toHexString)1 Path (java.nio.file.Path)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 Matchers.isEmptyOrNullString (org.hamcrest.Matchers.isEmptyOrNullString)1 Test (org.junit.Test)1