docker 安装运行 Nacos

本文详细介绍了如何使用Docker来安装和运行Nacos,包括搜索Nacos镜像、拉取并启动容器,以及如何访问Nacos控制台。默认账号密码为'nacos',成功登录后将显示Nacos控制台界面。
摘要由CSDN通过智能技术生成

1. 搜索 Nacos

[root@graph2 ~]# docker search nacos
NAME                             DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
nacos/nacos-server               This project contains a Docker image meant t…   185                                     [OK]
nacos/nacos-mysql-master         nacos-mysql-master                              6
nacos/nacos-mysql                                                                6
paderlol/nacos                   Nacos-quick-start-https://nacos.io/en-us/doc…   5
nacos/nacos-peer-finder-plugin   scale plugin for nacos k8s                      1
nacos/nacos-mysql-slave                                                          1
justtin/nacos                    以alpine linux+dragonwell8为基础镜像,并更新…             1
hackyo/nacos                     This project contains a Docker image meant t…   1
chenfengwei/nacos                nacos服务镜像,nacos版本1.3.2,同时兼任arm64…               0
dockerlishijie/nacos-server                                                      0
tonychen0716/nacos-server        Multi-arch image for Alibaba Nacos              0
eduosi/nacos-server                                                              0
lizexiong/nacos                                                                  0
tanyi/nacos-server               nacos-server官方包制作而成的镜像                          0
jude95/nacos-server-mysql8       nacos with mysql8                               0
paderlol/nacos-mysql-master                                                      0
paderlol/nacos-mysql-slave                                                       0
fdiskbrain/nacos-server          nacos server                                    0
king019/nacos                                                                    0
dtype/nacos-server                                                               0
fansys/nacos                                                                     0
agh0st/nacos                                                                     0
pengzu/nacos                     nacos server is made by nacos official code.…   0
alaien/nacos-cluster                                                             0
fansys/nacos2                                                                    0

2. 拉取镜像

[root@graph2 ~]# docker pull nacos/nacos-server
Using default tag: latest
latest: Pulling from nacos/nacos-server
5ad559c5ae16: Pull complete
5746ca7cf180: Pull complete
d709fe221c89: Pull complete
e88fdcf257b1: Pull complete
eb573b28173c: Pull complete
a71625257ced: Pull complete
26e7e7836838: Pull complete
30f7d6851c4a: Pull complete
d565cd94c625: Pull complete
Digest: sha256:87a3d8b78ec24c253a4db7c093097a7b256327eb5117cd9498e289b896918153
Status: Downloaded newer image for nacos/nacos-server:latest
docker.io/nacos/nacos-server:latest

3. 启动 Nacos 容器

常用启动配置

name description option
MODE cluster/standalone cluster/standalone default cluster
NACOS_SERVERS nacos cluster address eg. ip1:port1 ip2:port2 ip3:port3
PREFER_HOST_MODE Whether hostname are supported hostname/ip default ip
NACOS_APPLICATION_PORT nacos server port default 8848
NACOS_SERVER_IP custom nacos server ip when network was mutil-network
SPRING_DATASOURCE_PLATFORM standalone support mysql mysql / empty default empty
MYSQL_SERVICE_HOST mysql host
MYSQL_SERVICE_PORT mysql database port default : 3306
MYSQL_SERVICE_DB_NAME mysql database name
MYSQL_SERVICE_USER username of database
MYSQL_SERVICE_PASSWORD password of database
MYSQL_DATABASE_NUM It indicates the number of database default :1
MYSQL_SERVICE_DB_PARAM Database url parameter default : characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
JVM_XMS
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值