Docker启动Nacos服务
官网地址:https://nacos.io/zh-cn/docs/v2/quickstart/quick-start-docker.html
style="width:100%;height:500px;" src="https://nacos.io/zh-cn/docs/v2/quickstart/quick-start-docker.html">
使用Docker启动
docker-compose -f standalone-derby.yaml -p nacos-standalone-derby up
version: "2"
services:
nacos:
image: nacos/nacos-server:latest
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
- NACOS_AUTH_IDENTITY_KEY=serverIdentity
- NACOS_AUTH_IDENTITY_VALUE=security
- NACOS_AUTH_TOKEN=SecretKey012345678901234567890123456789012345678901234567890123456789
ports:
- "8848:8848"
- "9848:9848"
prometheus:
container_name: prometheus
image: prom/prometheus:latest
ports:
- "9090:9090"
depends_on:
- nacos
restart: on-failure
grafana:
container_name: grafana
image: grafana/grafana:latest
ports:
- 3000:3000
restart: on-failure
结果如下
打开控制台