Docker -Compose and Run in a docker container

I have a Docker-Compose build step that brings up a MSSQL database for testing against and the next build step is a gradle command that I am running in another docker container.  

My issue is that every other build is failing on the docker-compose command with the following error:

[18:08:50][Step 2/5] docker-compose for "docker-compose.yml" has already been started, is it a duplicating build step?
[18:08:50][Step 2/5] docker-compose for "docker-compose.yml" has already been started, is it a duplicating build step?
[18:08:50][Step 2/5] Step Docker Compose failed with unexpected error
 
And my build fails.
 
What I think is happening is that TC destroys my second docker container (the one used for the gradle build) but never destroys the docker-compose container and then on the next build, it tries to docker-compose it up and finds it still running.
 
Any suggestions?
 
0
3 comments

Hello Jim,

   The message "docker-compose for "docker-compose.yml" has already been started" is shown only when there is a docker-compose process related to your docker-compose file is running. Possibly, the docker-compose is not shut down correctly at the end of the build. I'd appreciate if you attach build logs for the build which works, and for the build which does not.

  If you don't want to share this information publically, create an issue in our issue tracker and attach the logs with visibility "for jetbrains-team".

  Thanks,

0
Avatar
Permanently deleted user

I'm having the same problem now. There is nothing noticeable in the logs; the previous build has "Stopping docker-compose for docker-compose.yml" in it without any error messages, but now all new builds fail with the following error messages:

docker-compose for "docker-compose.yml" has already been started, is it a duplicating build step?
docker-compose for "docker-compose.yml" has already been started, is it a duplicating build step?
Step Docker Compose Up (Docker Compose) failed with unexpected error
0

Hello,

  New builds are failing because on the agent there is an active docker process which have not been stopped correctly, run `docker ps` to see it there.

  It is not clear why the process haven't stopped. If the problem reproduces, please create an issue in our issue tracker and provide logs for the builds and logs from the buildAgent/logs directory.

  Thanks,

0

Please sign in to leave a comment.