docker.recipes

MinIO Development

beginner

S3-compatible object storage for development.

Overview

MinIO is a high-performance, S3-compatible object storage server built for cloud-native applications and modern data infrastructure. Originally created to provide a self-hosted alternative to Amazon S3, MinIO has evolved into a powerful object storage solution that delivers enterprise-grade performance with sub-10ms latencies and multi-GB/s throughput rates. Its 100% S3 API compatibility makes it a drop-in replacement for AWS S3 in development and production environments. This development stack provides a single-node MinIO instance optimized for local development and testing scenarios. The configuration exposes both the S3 API endpoint on port 9000 and the modern web-based management console on port 9001, enabling developers to interact with MinIO through programmatic interfaces or visual management tools. The setup includes persistent storage volumes to maintain data between container restarts and environment variable configuration for credential management. This stack is ideal for developers building applications that integrate with S3 storage, teams wanting to reduce AWS costs during development, and organizations needing to prototype object storage workflows locally. The combination provides the full S3 experience without external dependencies, making it perfect for offline development, CI/CD pipelines, and scenarios where you need predictable storage behavior without cloud provider limitations or egress fees.

Key Features

  • 100% S3 API compatibility supporting all major AWS SDK operations
  • High-performance object storage with multi-GB/s throughput capabilities
  • Modern web console for bucket management and object browsing
  • Built-in erasure coding for data protection and redundancy
  • Server-side encryption at rest with configurable key management
  • Bucket versioning and lifecycle management policies
  • Object locking for compliance and WORM storage requirements
  • Lambda-compatible event notifications for automated workflows

Common Use Cases

  • 1Local development environment for S3-dependent applications
  • 2CI/CD pipeline storage for artifacts and test data
  • 3Self-hosted backup storage for personal or small business data
  • 4ML/AI model storage and dataset management for data science teams
  • 5Static website hosting and CDN origin server
  • 6Media asset storage for content management systems
  • 7Development and testing of S3-based microservices architectures

Prerequisites

  • Docker and Docker Compose installed on your system
  • Minimum 512MB RAM available, 2GB+ recommended for better performance
  • Ports 9000 and 9001 available on your host machine
  • Environment variables MINIO_USER and MINIO_PASSWORD configured
  • Basic understanding of S3 API concepts and bucket operations
  • Sufficient disk space for your anticipated object storage needs

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 minio:
3 image: minio/minio:latest
4 container_name: minio
5 restart: unless-stopped
6 command: server /data --console-address ":9001"
7 environment:
8 MINIO_ROOT_USER: ${MINIO_USER}
9 MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
10 volumes:
11 - minio_data:/data
12 ports:
13 - "9000:9000"
14 - "9001:9001"
15
16volumes:
17 minio_data:

.env Template

.env
1MINIO_USER=minioadmin
2MINIO_PASSWORD=minioadmin

Usage Notes

  1. 1Docs: https://min.io/docs/minio/container/index.html
  2. 2Console at http://localhost:9001 - login with configured credentials
  3. 3S3 API at http://localhost:9000 - use as endpoint in AWS SDK
  4. 4Create buckets and manage objects via console
  5. 5S3-compatible: works with any tool expecting S3 (Rclone, boto3)
  6. 6Ideal for local development mocking AWS S3

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 minio:
5 image: minio/minio:latest
6 container_name: minio
7 restart: unless-stopped
8 command: server /data --console-address ":9001"
9 environment:
10 MINIO_ROOT_USER: ${MINIO_USER}
11 MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
12 volumes:
13 - minio_data:/data
14 ports:
15 - "9000:9000"
16 - "9001:9001"
17
18volumes:
19 minio_data:
20EOF
21
22# 2. Create the .env file
23cat > .env << 'EOF'
24MINIO_USER=minioadmin
25MINIO_PASSWORD=minioadmin
26EOF
27
28# 3. Start the services
29docker compose up -d
30
31# 4. View logs
32docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/minio-dev/run | bash

Troubleshooting

  • Console shows 'Invalid Login' error: Verify MINIO_USER and MINIO_PASSWORD environment variables are set and match your login credentials
  • S3 clients can't connect to localhost:9000: Ensure your AWS SDK is configured with the correct endpoint URL and disable SSL verification for local development
  • MinIO container exits with permission errors: Check that the Docker daemon has proper permissions to create and mount the minio_data volume
  • Browser shows 'This site can't be reached' for console: Confirm port 9001 isn't blocked by firewall and the container is running with docker ps
  • Objects upload but disappear after restart: Verify the volume mount is working correctly and data is persisting to the minio_data volume
  • Bucket creation fails with access denied: Ensure you're using the root credentials defined in MINIO_ROOT_USER and MINIO_ROOT_PASSWORD variables

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space