赞
踩
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/plugins:/opt/rabbitmq/plugins -v /xzlawin/mydocker/rabbitmq/volume/5672/log:/var/log/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/data:/var/lib/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/config:/etc/rabbitmq -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest 6c3c2a225947
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq 6c3c2a225947
docker ps
docker inspect [容器ID]
控制台显示
"Mounts": [ { "Type": "volume", "Name": "rabbitmq_log", "Source": "/var/lib/docker/volumes/rabbitmq_log/_data", "Destination": "/var/log/rabbitmq", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "rabbitmq_plugins", "Source": "/var/lib/docker/volumes/rabbitmq_plugins/_data", "Destination": "/opt/rabbitmq/plugins", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "rabbitmq_config", "Source": "/var/lib/docker/volumes/rabbitmq_config/_data", "Destination": "/etc/rabbitmq", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "rabbitmq_data", "Source": "/var/lib/docker/volumes/rabbitmq_data/_data", "Destination": "/var/lib/rabbitmq", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" } ],
docker stop [容器ID]
docker ps -a [容器ID]
docker rm -f [容器ID]
docker run -d \
--name rabbitmq \
-p 5672:5672 \
-p 15672:15672 \
-e RABBITMQ_DEFAULT_USER=guest \
-e RABBITMQ_DEFAULT_PASS=guest \
-v /var/lib/docker/volumes/rabbitmq_config/_data:/etc/rabbitmq \
-v /var/lib/docker/volumes/rabbitmq_data/_data:/var/lib/rabbitmq \
-v /var/lib/docker/volumes/rabbitmq_log/_data:/var/log/rabbitmq \
-v /var/lib/docker/volumes/rabbitmq_plugins/_data:/opt/rabbitmq/plugins \
rabbitmq:management
docker stop [容器ID]
docker ps -a [容器ID]
docker rm -f [容器ID]
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/plugins:/opt/rabbitmq/plugins -v /xzlawin/mydocker/rabbitmq/volume/5672/log:/var/log/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/data:/var/lib/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/config:/etc/rabbitmq -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest 6c3c2a225947
docker stop [容器ID]
docker ps -a [容器ID]
docker rm -f [容器ID]
ll /xzlawin/mydocker/rabbitmq/volume/5672/plugins
ll /xzlawin/mydocker/rabbitmq/volume/5672/log
ll /xzlawin/mydocker/rabbitmq/volume/5672/data
ll /xzlawin/mydocker/rabbitmq/volume/5672/config
cp -r /var/lib/docker/volumes/rabbitmq_log/_data/* /xzlawin/mydocker/rabbitmq/volume/5672/log
cp -r /var/lib/docker/volumes/rabbitmq_plugins/_data/* /xzlawin/mydocker/rabbitmq/volume/5672/plugins
cp -r /var/lib/docker/volumes/rabbitmq_config/_data/* /xzlawin/mydocker/rabbitmq/volume/5672/config
cp -r /var/lib/docker/volumes/rabbitmq_data/_data/* /xzlawin/mydocker/rabbitmq/volume/5672/data
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/plugins:/opt/rabbitmq/plugins -v /xzlawin/mydocker/rabbitmq/volume/5672/log:/var/log/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/data:/var/lib/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/config:/etc/rabbitmq -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest 6c3c2a225947
docker logs -t --tail 50 [容器ID]
failed to open log file at '/var/log/rabbitmq/rabbit@ab5217e3f168_upgrade.log', reason: permission denied
ll /var/lib/docker/volumes/rabbitmq_log/
显示
drwxrwxrwx 2 polkitd input 123 Jul 14 02:17 _data
chmod 777 /xzlawin/mydocker/rabbitmq/volume/5672/log
docker stop [容器ID]
docker ps -a [容器ID]
docker rm -f [容器ID]
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/plugins:/opt/rabbitmq/plugins -v /xzlawin/mydocker/rabbitmq/volume/5672/log:/var/log/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/data:/var/lib/rabbitmq -v /xzlawin/mydocker/rabbitmq/volume/5672/config:/etc/rabbitmq -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest 6c3c2a225947
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。