Skip to content

Instantly share code, notes, and snippets.

@ohnotnow
Created August 6, 2020 16:34
Show Gist options
  • Save ohnotnow/510a601e32cb47fa28fbb07c51cb39d5 to your computer and use it in GitHub Desktop.
Save ohnotnow/510a601e32cb47fa28fbb07c51cb39d5 to your computer and use it in GitHub Desktop.
Create a minio bucket in docker compose formet
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/usr/bin/mc rm -r --force myminio/somebucketname;
/usr/bin/mc mb myminio/somebucketname;
/usr/bin/mc policy download myminio/somebucketname;
exit 0;
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment