rabbitmq

1、docker启动

FROM docker.io/rabbitmq:3.7.14 
LABEL description="2022-11"
COPY Shanghai /etc/localtime
RUN  echo 'Asia/Shanghai' >/etc/timezone

2、打包镜像

# docker build   -t rabbitmq:v1  .

3、启动镜像

# docker run -d --privileged -p 5672:5672  rabbitmq:v1

4、设置账户和密码

# rabbitmqctl add_vhost test 
# rabbitmqctl add_user admin 123456 
# rabbitmqctl set_permissions -p test admin  ".*" ".*" ".*" 

5、测试

 

posted on 2022-11-22 18:44  五光十色  阅读(23)  评论(0编辑  收藏  举报

导航