docker搭建rmq
docker run -d --hostname my-rabbit --name rabbit -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password -p 15672:15672 -p 5672:5672 rabbitmq:management
docker cp -a rabbit:/var/lib/rabbitmq /tian/rabbitmq/lib/
docker cp -a rabbit:/etc/rabbitmq /tian/rabbitmq/etc/
docker cp -a rabbit:/var/log/rabbitmq /tian/rabbitmq/log/
docker rm -f rabbit
docker run -d --hostname rabbit \
--name rabbit --privileged=true \
-v /tian/rabbit/rabbitmq/etc:/etc/rabbitmq \
-v /tian/rabbit/rabbitmq/lib:/var/lib/rabbitmq \
-v /tian/rabbit/rabbitmq/log:/var/log/rabbitmq \
-p 15672:15672 -p 5672:5672 rabbitmq:management;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19