Skip to content

Instantly share code, notes, and snippets.

@dejanstojanovic
Created October 8, 2021 08:51
Show Gist options
  • Save dejanstojanovic/9ec923d3da0d2c8bd87c2b28076180f1 to your computer and use it in GitHub Desktop.
Save dejanstojanovic/9ec923d3da0d2c8bd87c2b28076180f1 to your computer and use it in GitHub Desktop.
docker run -d --rm --name local-rabbitmq -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
docker exec local-rabbitmq rabbitmq-plugins enable rabbitmq_management
docker exec local-rabbitmq rabbitmq-plugins enable rabbitmq_shovel
docker exec local-rabbitmq rabbitmq-plugins enable rabbitmq_shovel_management
docker exec local-rabbitmq rabbitmqctl add_user myuser mypass
docker exec local-rabbitmq rabbitmqctl set_user_tags myuser administrator
docker exec local-rabbitmq rabbitmqctl add_vhost myapphost
docker exec local-rabbitmq rabbitmqctl set_permissions --vhost "myapphost" myapp ".*" ".*" ".*"
docker stop local-rabbitmq
###########################################################
#NOTE: For RabbitMQ try using init.sh (https://stackoverflow.com/questions/30747469/how-to-add-initial-users-when-starting-a-rabbitmq-docker-container)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment