简体   繁体   中英

How to run jhipster-registry from docker?

I'm new to jhipster, I'm trying to run jhipster-registry, but it seems I can not access it from my browser with this url:http://localhost:8761/

How did I install jhipster-registry in docker?

  1. Install docker on mac.
  2. docker pull jhipster/jhipster-registry
  3. docker run jhipster/jhipster-registry
  4. I could see everything run smoothly.
----------------------------------------------------------
    Application 'jhipster-registry' is running! Access URLs:
    Local:      http://localhost:8761/
    External:   http://172.17.0.2:8761/
    Profile(s):     [composite, prod]
----------------------------------------------------------
2020-08-18 03:45:45.853  INFO 6 --- [           main] i.g.j.registry.JHipsterRegistryApp       : 
----------------------------------------------------------
    Config Server:  Connected to the JHipster Registry config server, using https://github.com/jhipster/jhipster-registry-sample-config !
  1. access at http://localhost:8761/ but failed.

Any idea on this one?

In https://www.jhipster.tech/jhipster-registry/ you'll read "A docker-compose file to run this image is already present within each microservice src/main/docker directory". Did you try eg https://github.com/jhipster/jhipster-sample-app-microservice/blob/master/src/main/docker/jhipster-registry.yml - or your own?

It depends on the docker command you use to run the service. You must open the ports to the container.

If you just want to see the dashboard you can run this docker command

docker run -p 8761:8761 jhipster/jhipster-registry

After running this command you can type:

localhost:8761

in your browser, you should see the console.

If you want to connect the registry to other microservices, you need to set up a docker network overlay.

You can also use docker swarm or kubernetes for horizontal scaling (to make more replicas)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM