jordan.baucke
jordan.baucke

Reputation: 4328

Jhipster Docker-compose conflict

I am attempting to use jhipster to generate a microservices architecture set of apps. From within the jhipster-devbox, I do the following:

$ mkdir mygateway && cd mygateway

$ yo jhipster - select gateway, answer all questions

$ ./gradlew bootRepackage -Pdev buildDocker want to make sure this all runs locally before I try to move it to AWS

$ cd.. && mkdir myapi && && cd myapi

$ yo jhipster - select microservices app (same package name as gateway...don't know if that matters, but not for this question)

$ ./gradlew bootRepackage -Pdev buildDocker

$ cd .. && mkdir docker-compose && cd docker-compose

$ yo jhipster:docker-compose (all items have run successfully to this point)

$ docker-compose up -d returns:

ERROR: Conflict. The name "/jhipster-registry" is already in use by container a785f619b5dd985b3ff30a8ed6e41066795eb8b5e108d2549cd4a9d5dc27710a. You have to remove (or rename) that container to be able to reuse that name.

It would appear the "jhipster-registry" is available inside the gateway and api apps I just created... I tried commenting them out of the app.yml file to no success?

Upvotes: 0

Views: 523

Answers (1)

sdoxsee
sdoxsee

Reputation: 4681

I had the same problem but it's that you already have a docker container named "jhipster-registry". I imagine it's because you already had created at least 1 other jhipster microservices stack with docker before. If you remove the jhipster-registry container (i.e. docker rm jhipster-registry) and then run docker-compose up -d again, you should be fine as it will recreate the container. I'm not sure why the jhipster-registry container doesn't get prefixed by the directory it's in (as the other containers in the stack do). I think it has to do with the jhipster-registry.yml file that specifically names the container "jhipster-registry".

Upvotes: 5

Related Questions