v0.1
Initial release 🥳
Base Image
The image is based on the official minio/mc
image, providing a stable and up-to-date environment for MinIO client operations.
Features
- Automatic user creation and policy assignment in MinIO
- Dynamic policy generation based on bucket and object permissions
- Customizable configuration via environment variables
- Support for existing user detection
- Debug mode for troubleshooting
- Native Docker health checks to ensure everything is working
Environment Variables
The following environment variables can be used to customize the MinIO user initialization:
Variable | Description | Default Value |
---|---|---|
MINIO_ADMIN_USER |
Admin username for MinIO | - |
MINIO_ADMIN_PASSWORD |
Admin password for MinIO | - |
MINIO_HOST |
MinIO server URL | - |
MINIO_USER_ACCESS_KEY |
Access key for the new user | - |
MINIO_USER_SECRET_KEY |
Secret key for the new user | - |
MINIO_USER_BUCKET_NAME |
Name of the bucket to create | - |
MINIO_ALIAS |
Alias for the MinIO server | minio |
MINIO_USER_BUCKET_PERMISSIONS |
Comma-separated list of bucket permissions | s3:ListBucket,s3:GetBucketLocation,s3:ListBucketMultipartUploads |
MINIO_USER_OBJECT_PERMISSIONS |
Comma-separated list of object permissions | s3:PutObject,s3:GetObject,s3:DeleteObject,s3:ListMultipartUploadParts,s3:AbortMultipartUpload |
DEBUG |
Enable debug mode | false |
SLEEP |
Keep container running after initialization | true |
Usage
-
Pull the Docker image:
docker pull serversideup/minio-user-init:latest
-
Run the container with the required environment variables:
docker run --rm \ -e MINIO_ADMIN_USER="admin" \ -e MINIO_ADMIN_PASSWORD="adminpassword" \ -e MINIO_HOST="http://minio:9000" \ -e MINIO_USER_ACCESS_KEY="myaccesskey" \ -e MINIO_USER_SECRET_KEY="mysecretkey" \ -e MINIO_USER_BUCKET_NAME="mybucket" \ serversideup/minio-user-init:latest
Works great for orchestrated deployments
We designed this image to work great in orchestrated deployments like Kubernetes, Docker Swarm, or even in Github Actions. Look how simple the syntax is:
minio-user-init:
image: serversideup/minio-user-init:latest
environment:
MINIO_ADMIN_USER: "${MINIO_ADMIN_USER}"
MINIO_ADMIN_PASSWORD: "${MINIO_ADMIN_PASSWORD}"
MINIO_ALIAS: "myminio"
MINIO_HOST: "https://minio.example.com:9000"
MINIO_USER_ACCESS_KEY: "myaccesskey"
MINIO_USER_SECRET_KEY: "mysecretkey"
MINIO_USER_BUCKET_NAME: "mybucket"
MINIO_USER_BUCKET_PERMISSIONS: "s3:ListBucket,s3:GetBucketLocation"
MINIO_USER_OBJECT_PERMISSIONS: "s3:PutObject,s3:GetObject"