title: How to use the rabbitmq docker compose yml file to build docker image?
body: <p>I'm new to docker and I know how to pull images of Ubuntu Linux and run it. I just wish to try out rabbitmq, and the site says we can use a <code>docker-composer.yml</code> file like this:</p>
  
  <pre><code>rabbitmq:
    image: rabbitmq:management
    ports:
      - "5672:5672"
      - "15672:15672"
  </code></pre>
  
  <p>I googled for a while but only find YAML related sites talks about how to write a complex YAML file. But my question is, how to use this YAML file to build/compose any docker image with rabbitmq so that I can start to use it?</p>