How to boot docker image which has "CMD mvn clean install" in its dockerfile?

asked 2015-06-11 08:58:01 -0500

Emad gravatar image


I have created an image in docker using dockerfile which pulls an application from git, and then runs it using CMD mvn clean install. So everything is fine if I just run the application using docker run.

However if I try to boot the docker image using nova boot --image I get status error and the error is no valid host found. I commented the line CMD mvn clean install in the dockerfile then booted the image in nova, and it was working fine.

So is there any way that I can automatically run an application after nova boot, or nova start?

edit retag flag offensive close merge delete