ContainerCreateResponse containerCreateResponse = dockerClient.container().createNew()
.withImage(imageRepoUrl + ":" + imageTag)
.done();
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public void pullDockerImage(String imageRepoUrl, String imageTag) throws AppCloudException {
if (log.isDebugEnabled()) {
log.debug("Docker image pull triggered for repo : " + imageRepoUrl + " with tag : " + imageTag);
}
final boolean[] dockerStatusCheck = new boolean[1];
dockerStatusCheck[0] = false;
try {
handle = dockerClient.image().withName(imageRepoUrl).pull()
.usingListener(new EventListener() {
@Override
public void onSuccess(String message) {
log.info("Pull Success:" + message);
pullDone.countDown();
dockerStatusCheck[0] = true;
}
@Override
public void onError(String message) {
log.error("Pull Failure:" + message);
pullDone.countDown();
}
@Override
public void onEvent(String event) {
log.info(event);
}
}).withTag(imageTag).fromRegistry();
pullDone.await();
} catch (InterruptedException e) {
String msg = "Error occurred while pulling docker image " + imageRepoUrl + " with tag : " + imageTag;
throw new AppCloudException(msg, e);
} finally {
try {
handle.close();
} catch (IOException e) {
log.warn("Error occurred while closing output handle after pulling docker image " + imageRepoUrl +
" with tag : " + imageTag);
}
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.