This is my blogs kongshuo.|

kongshuo

园龄:4年粉丝:26关注:6

docker搭建Nacos

拉取镜像

[root@ecs-57a4 ~]# docker pull nacos/nacos-server
Using default tag: latest
Trying to pull repository docker.io/nacos/nacos-server ... 
latest: Pulling from docker.io/nacos/nacos-server
2d473b07cdd5: Pull complete 
cee47fd629ae: Pull complete 
84a2014f8cf0: Pull complete 
c6b323bb84ba: Pull complete 
054ba3dd31ca: Pull complete 
499f0fb6edda: Pull complete 
44f7142cdeb2: Pull complete 
16c455a3adda: Pull complete 
37ab0ca7ea67: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:be794368c96f90e42a6dd9f288d3fb12d69608cebd782eb091a489ccb48cfd28
Status: Downloaded newer image for docker.io/nacos/nacos-server:latest
[root@ecs-57a4 ~]# docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
docker.io/nacos/nacos-server   latest              440657d52bc3        5 weeks ago         1.07 GB

启动容器

[root@ecs-57a4 ~]# docker  run \
> --name nacos -d \
> -p 8848:8848 \
> --privileged=true \
> --restart=always \
> -e JVM_XMS=256m \
> -e JVM_XMX=256m \
> -e MODE=standalone \
> -e PREFER_HOST_MODE=hostname \
> nacos/nacos-server
6d29d6550669c70614d0af99a3f4e80e34f781f81564aa1636fc8ce33f1de65a
[root@ecs-57a4 ~]# docker ps
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                    NAMES
6d29d6550669        nacos/nacos-server   "bin/docker-startu..."   44 minutes ago      Up 44 minutes       0.0.0.0:8848->8848/tcp   nacos

测试

ip:8848/nacos 访问

用户名密码默认nacos


本文作者:kongshuo

本文链接:https://www.cnblogs.com/kongshuo/p/17082101.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   kongshuo  阅读(140)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起