title: Docker-Compose minio switches port when viewed in browser
body: <p>I am using the following section of my docker-compose.yml to add an s3 compatible service to my local development area:</p>
  <pre><code>  minio:
      image: minio/minio
      container_name: experiments_minio
      ports:
        - '9000:9000'
        - '9001:9001'
      environment:
        - MINIO_ACCESS_KEY=12345678
        - MINIO_SECRET_KEY=password
      command: server /data
  </code></pre>
  <p>When I run <em>docker-compose up</em>, <em>minio</em> is present in the list on active containers:</p>
  <pre><code>bb3b62a7a094   quiz_experiments_www   &quot;docker-php-entrypoi…&quot;   4 hours ago   Up 4 hours   0.0.0.0:81-&gt;80/tcp                  experiments_www
  121520becb01   minio/minio            &quot;/usr/bin/docker-ent…&quot;   4 hours ago   Up 4 hours   0.0.0.0:9000-9001-&gt;9000-9001/tcp    experiments_minio
  94e7c9494226   adminer                &quot;entrypoint.sh docke…&quot;   4 hours ago   Up 4 hours   0.0.0.0:8080-&gt;8080/tcp              experiments_adminer
  ef012349a6ce   mysql                  &quot;docker-entrypoint.s…&quot;   4 hours ago   Up 4 hours   33060/tcp, 0.0.0.0:3307-&gt;3306/tcp   experiments_db
  </code></pre>
  <p>My problem is when I visit <em>localhost/9001</em>, the browser switches the port portion of the url to some random numbers and I don't get the minio admin area.</p>
  <p>The output from the commandline does mention using <strong>--console-address</strong> to set a static port or one will be assigned.</p>
  <p>I can use the following code directly in the terminal to setup a minio container:</p>
  <pre><code>docker run \
    -p 9000:9000 \
    -p 9001:9001 \
    minio/minio server /data --console-address &quot;:9001&quot;
  </code></pre>
  <p><strong>But how can the  <strong>--console-address</strong> flag (or some equivalent) be set in docker-compose ?</strong></p>