Quick Start for Nacos Docker

Steps

Run the following command:

  • Clone project
  1. git clone https://github.com/nacos-group/nacos-docker.git
  2. cd nacos-docker
  • Stand-alone
  1. docker-compose -f example/standalone.yaml up
  • Cluster
  1. docker-compose -f example/cluster-hostname.yaml up
  • Service registration
  1. curl -X POST 'http://127.0.0.1:8848/nacos/v1/ns/instance?serviceName=nacos.naming.serviceName&ip=20.18.7.10&port=8080'
  • Service discovery
  1. curl -X GET 'http://127.0.0.1:8848/nacos/v1/ns/instances?serviceName=nacos.naming.serviceName'
  • Publish config
  1. curl -X POST "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test&content=helloWorld"
  • Get config
  1. curl -X GET "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test"
  • Open the Nacos console in your browser

link:http://127.0.0.1:8848/nacos/