This repository provides a Docker image for MinIO Console with mc
tool installed. The image includes functionality to automatically create public and private buckets on startup.
- MinIO Console installation
mc
tool installation- Automatic creation of public and private buckets on startup
- Checks to ensure buckets are not recreated if they already exist
To build the Docker image, run the following command:
docker build -t minio-console:latest .
Ensure the following environment variables are set:
USERNAME
: MinIO root usernamePASSWORD
: MinIO root passwordPUBLIC_BUCKET
: Name of the public bucket to createPRIVATE_BUCKET
: Name of the private bucket to createPORT
: Port for MinIO ConsoleCONSOLE_MINIO_SERVER
: MinIO server address (e.g.,http://localhost:9000
)
To run the Docker container, use the following command:
docker run -e USERNAME=<your-username> -e PASSWORD=<your-password> -e PUBLIC_BUCKET=<public-bucket> -e PRIVATE_BUCKET=<private-bucket> -e PORT=<port> -e CONSOLE_MINIO_SERVER=<minio-server> -p <host-port>:<port> minio-console:latest
Replace <your-username>
, <your-password>
, <public-bucket>
, <private-bucket>
, <port>
, <minio-server>
, and <host-port>
with appropriate values.
docker run -e USERNAME=minioadmin -e PASSWORD=minioadmin -e PUBLIC_BUCKET=public-bucket -e PRIVATE_BUCKET=private-bucket -e PORT=9001 -e CONSOLE_MINIO_SERVER=http://localhost:9000 -p 9001:9001 minio-console:latest
This command will start the MinIO Console on port 9001 and automatically create the specified public and private buckets.
This project is licensed under the MIT License.