Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arquillian cube can't retrieve image id from docker server #68

Closed
BrunoGilbertCrane opened this issue Jan 21, 2015 · 4 comments
Closed
Labels
Milestone

Comments

@BrunoGilbertCrane
Copy link

I try to run some tests with arquillian-cube-containerless 1.0.0.Alpha3.

I got the exception : org.arquillian.cube.spi.CubeControlException: Could not create mycube.
...
Caused by: java.lang.IllegalStateException: Docker server has not provided an imageId for image build from src/test/resources/docker/mondrian. Response from the server was:
Step 0 : FROM ubuntu:12.04 ---> f959d044ebdfStep 1 : MAINTAINER ......Successfully built bc7b77133064

As you can see the docker was build but the image id was not retrieved by DockerClientExecutor .buildImage().

I run this test on a ubuntu 12.04.

Using regular expression it is possible to resolve this issue in DockerClientExecutor class

private static final Pattern IMAGEID_PATTERN = Pattern.compile(".*Successfully built\s(\p{XDigit}+)");

Matcher m = IMAGEID_PATTERN.matcher(fullLog);
String imageId = null;
if (m.find()) {
imageId = m.group(1);
}
return imageId;

@lordofthejars
Copy link
Member

Strange that this happens just now. Probably it is something related with a docker version that has changed the way the instructions are executed or notified. Yes probably we will need to change to the regexp yo unoticed here.

BTW because of #67 now the image id will be used everywhere internally so we will not need to do the matcher approach to get the id because the DockerClient is going to return too.

Thanks for opening the issue, I am going to add your pattern expression to cover more cases.

@lordofthejars
Copy link
Member

Ok now that I have seen the PR I fully understand what you mean. Fixed :).

@BrunoGilbertCrane
Copy link
Author

You're welcome! Sorry for my english my native language is french :)

@lordofthejars
Copy link
Member

And mine Spanish :D but no prob, PR accepted, thanks for the collaboration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants