Documentation

Quick Start for Nacos Docker

Steps

Run the following command:

  • Clone project

    git clone https://github.com/nacos-group/nacos-docker.git
    cd nacos-docker
    
  • Stand-alone

    docker-compose -f example/standalone.yaml up
    
  • Cluster

    docker-compose -f example/cluster-hostname.yaml up 
    
  • Service registration

    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

    curl -X GET 'http://127.0.0.1:8848/nacos/v1/ns/instances?serviceName=nacos.naming.serviceName'
    
  • Publish config

    curl -X POST "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test&content=helloWorld"
    
  • Get config

      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/

Related Projects