title: Minio: Add a public bucket with docker-compose
body: <p>Below is a service in my docker compose.</p>
  <pre><code>  minio:
      image: minio/minio:edge
      environment:
        MINIO_ACCESS_KEY: minio123
        MINIO_SECRET_KEY: minio123
      volumes:
        - datastore:/data
      ports:
        - 9000:9000
      networks:
        - devnetwork
      command: server /data
  </code></pre>
  <p>i tried multiple commands like the following:</p>
  <pre><code>mc policy set public myminio/mybucket
  </code></pre>
  <p>always get the below error when i try access an image in my bucket</p>
  <pre><code>  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
    &lt;Error&gt;
    &lt;Code&gt;AccessDenied&lt;/Code&gt;
    &lt;Message&gt;Access Denied.&lt;/Message&gt;
    &lt;Key&gt;images/281c1458-41cd-4e1e-b6d5-b7243b9ac650.jpg&lt;/Key&gt;
    &lt;BucketName&gt;mybucket&lt;/BucketName&gt;
    &lt;Resource&gt;/mybucket/images/281c1458-41cd-4e1e-b6d5-b7243b9ac650.jpg&lt;/Resource&gt;
    &lt;RequestId&gt;1667FAC6085F2E6C&lt;/RequestId&gt;
    &lt;HostId&gt;9159f2da-4de3-4300-91fe-d59a41d883c4&lt;/HostId&gt;
    &lt;/Error&gt;
  </code></pre>