I have base image with Jboss copied on it. Jboss is started with a script and takes around 2 minutes.
In my Dockerfile
I have created a command.
CMD start_deploy.sh && tail -F server.log
I do a tail to keep the container alive otherwise "docker-compose up
" exits when script finishes and container stops.
The problem is when I do "docker-compose up
" through Jenkins the build doesn't finishes because of tail and I couldn't start the next build.
If I do "docker-compose up -d
" then next build starts too early and starts executing tests against the container which hasn't started yet.
Is there a way to return from docker-compose up when server has started completely.