public static void pullImage(String imageTag, String username, String password, String host) throws IOException {
        final AuthConfig authConfig = new AuthConfig();
        authConfig.withUsername(username);
        authConfig.withPassword(password);

        DockerClient dockerClient = null;
        try {
            dockerClient = getDockerClient(host);
            dockerClient.pullImageCmd(imageTag).withAuthConfig(authConfig).exec(new PullImageResultCallback()).awaitSuccess();
        } finally {
            closeQuietly(dockerClient);
        }
    }
public static void pullImage ( String imageTag , String username , String password , String host ) throws IOException { final AuthConfig authConfig = new AuthConfig ( ) ; authConfig . withUsername ( username ) ; authConfig . withPassword ( password ) ; DockerClient dockerClient = null ; try { dockerClient = getDockerClient ( host ) ; dockerClient . pullImageCmd ( imageTag ) . withAuthConfig ( authConfig ) . exec ( new PullImageResultCallback ( ) ) . awaitSuccess ( ) ; } finally { closeQuietly ( dockerClient ) ; } }
Pull docker image using the docker java client.

@param imageTag
@param username
@param password
@param host