Mc: Minio mc docker compose file not create bucket

Created on 6 Apr 2020  ·  1Comment  ·  Source: minio/mc

I add my docker-compose.yml file why bucket not creating using this command . plz help me

minio:
image: "minio/minio"
container_name: myminio
ports:
- "9000:9000"
environment:
- "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE"
- "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
restart: always
command: server /data
mc:
image: minio/mc
container_name: mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/mc host rm local
/mc config host add local http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/mc mb local/somebucketname1;
/mc policy set public local/somebucketname1;
"

community low

Most helpful comment

please use something like this

version: '2'

services:
 minio:
  image: minio/minio:latest
  container_name: myminio
  environment:
   MINIO_ACCESS_KEY: minio
   MINIO_SECRET_KEY: minio123
  command: server /data
 mc:
  image: minio/mc:latest
  depends_on:
   - minio
  entrypoint: >
    /bin/sh -c "
    /usr/bin/mc config host rm local;
    /usr/bin/mc config host add --quiet --api s3v4 local http://myminio:9000 minio minio123;
    /usr/bin/mc rb --force local/somebucketname1/;
    /usr/bin/mc mb --quiet local/somebucketname1/;
    /usr/bin/mc policy set public local/somebucketname1;
    "

Please reach us out at https://slack.min.io for further such questions

>All comments

please use something like this

version: '2'

services:
 minio:
  image: minio/minio:latest
  container_name: myminio
  environment:
   MINIO_ACCESS_KEY: minio
   MINIO_SECRET_KEY: minio123
  command: server /data
 mc:
  image: minio/mc:latest
  depends_on:
   - minio
  entrypoint: >
    /bin/sh -c "
    /usr/bin/mc config host rm local;
    /usr/bin/mc config host add --quiet --api s3v4 local http://myminio:9000 minio minio123;
    /usr/bin/mc rb --force local/somebucketname1/;
    /usr/bin/mc mb --quiet local/somebucketname1/;
    /usr/bin/mc policy set public local/somebucketname1;
    "

Please reach us out at https://slack.min.io for further such questions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mausch picture mausch  ·  8Comments

sebschlue picture sebschlue  ·  12Comments

TJC picture TJC  ·  10Comments

philipkozeny picture philipkozeny  ·  9Comments

tru2dagame picture tru2dagame  ·  6Comments