首先查看仓库中有哪些镜像:

docker search emqx
NAME                            DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
emqx/emqx                       An Open-Source, Cloud-Native, Massive-Scalab…   130                  
emqx/emqx-ee                    EMQ X Enterprise - Cloud-Native IoT Messagin…   8                    
emqx/kuiper                     A lightweight IoT edge analytics software ht…   2                    
emqx/emqx-edge                  EMQ X Broker - Massively Scalable MQTT Messa…   2                    
emqx/edge-manager                                                               2                    
emqx/kuiper-manager                                                             2                    
raymondmm/emqx                                                                  1                    
emqx/neuron                     Neuron - Industrial IoT Gateway Software for…   1                    
emqx/relup-test-env                                                             0                    
sakibsami/emqx                                                                  0 

直接下载最新版的(第一个:emqx/emqx )

docker pull emqx/emqx

拉取完后,查看本地镜像有木有刚刚下载的(嗯,有了,木有嘛哒)

docker images
REPOSITORY               TAG       IMAGE ID       CREATED       SIZE
mongo                    latest    4253856b2570   9 days ago    701MB
emqx/emqx                latest    d9427f0f475e   2 weeks ago   154MB
nginx                    latest    87a94228f133   6 weeks ago   133MB
wurstmeister/kafka       latest    11142da99906   7 weeks ago   505MB
wurstmeister/zookeeper   latest    3f43f72cb283   2 years ago   510MB

开始使用镜像创建容器(参数说明往后看)

取消匿名访问

开启emqx_auth_username扩展(Emqx4.3版本之前)

emqx_ctl plugins load emqx_auth_username
#命令添加账号密码或者编辑配置文件
emqx_ctl users add admin public
#编辑用户名密码配置文件
vim /etc/emqx/plugins/emqx_auth_username.conf
## username 认证数据
auth.user.2.username = admin
auth.user.2.password = public
## Password hash
auth.user.password_hash = sha256

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐