docker network create rabbits
docker run -d --rm --net rabbits -p 8080:15672 --hostname rabbit-1 --name image-service rabbitmq:3.8
note: if you cannot access rabbitmq management, try this:
exec -it rabbit-1 bash
rabbitmq-plugins enable rabbitmq_maangement
to check if this worked you can simply try:
rabbitmq-plugins list
if rabbitmq_web_dispatch, rabbitmq_management and rabbitmq_management_agent didn't get enabled, DIY.
docker build -t image-service .
docker run -p 5672:5672 image-service
go test