title: How to set up container using Docker Compose to use a static IP and be accessible outside of VM host?
body: <p>I'd like to specify a static IP address for my container in my <code>docker-compose.yml</code>, so that I can access it e.g. using <code>https://&lt;ip-address&gt;</code> or <code>ssh user@&lt;ip-address&gt;</code> from outside the host VM.</p>
  
  <p>That is, making it possible for other machines on my company network to access the Docker container directly, on a specific static IP address. I do not wish to map specific ports, I wish to be able to access the container directly.</p>
  
  <p>A starting point for the <code>docker-compose.yml</code>:</p>
  
  <pre><code>master:
    image: centos:7
    container_name: master
    hostname: master
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>I'm using the Virtualbox driver, as I'm on OS X.</p>