Volumes | Docker Docs

Github repos

learning-docker/1-getting-started-guide/README-2-docker-volume.md at main · spawnmarvel/learning-docker · GitHub

rabbitmq

docker inspect rabbitmq1

 “Mounts”: [

            {

                “Type”: “volume”,

                “Name”: “6f45a2401d04faec4c5dbb792f8834897eb7a55b44226cec20c3a8a8f8448dfb”,

                “Source”: “/var/lib/docker/volumes/6f45a2401d04faec4c5dbb792f8834897eb7a55b44226cec20c3a8a8f8448dfb/_data”,

                “Destination”: “/var/lib/rabbitmq”,

docker exec -it rabbitmq1 bash

plugins

rabbitmq-plugins enable rabbitmq_management

open nsg and get the public ip

docker run -d –hostname rmq1 –name rabbitmq1 -p 15672:15672 rabbitmq:3-management

Login

make a queue and verify it

Side not, had to test shovel to docker:

Publish a message

docker volume create rabbitmq_data

docker run -d –hostname rmq2 –name rabbitmq2 -p 15672:15672 -p 5672:5672 –mount type=volume,src=rabbitmq_data,target=/var/lib/rabbitmq rabbitmq:3.12-management

add some messages to queue852 (after nsg and vist http://)

PERSISTENT, PERSISTENT AND PERSISTENT

docker stop, start or restart rabbitmq2

and the 3 messages are persistent