Skip to content

This project contains a Docker image meant to facilitate the deployment of Nacos .

Notifications You must be signed in to change notification settings

everything8/nacos-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nacos Docker

This project contains a Docker image meant to facilitate the deployment of Nacos .

Project directory

  • build:Nacos makes the source code of the docker image
  • env: Environment variable file for compose yaml
  • example: Docker compose example for Nacos server

Precautions

The cluster configuration domain name resolution is not supported until version 0.5.0 of Nacos

  1. When the Nacos version is below 0.5.0, You can use cluster-ip.yaml when you execute the docker-compose command
  2. When Nacos version 0.5.0 or higher, You can use either cluster-hostname.yaml or cluster-ip.yaml when you execute the docker-compose command

Quick Start

Run the following command:

  • Clone project

    git clone https://github.com/nacos-group/nacos-docker.git
    cd nacos-docker
  • Standalone Derby

    docker-compose -f example/standalone-derby.yaml up
  • Standalone Mysql

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

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

    curl -X PUT '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/

About

This project contains a Docker image meant to facilitate the deployment of Nacos .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 66.8%
  • Dockerfile 33.2%