Cloud Native 9 min read

How to Install and Use MinIO Object Storage with Docker – A Step‑by‑Step Guide

This article walks you through MinIO’s features, deployment requirements, Docker installation, web‑UI access, bucket creation, sharing links, access policies, and using the MinIO client (mc) for common S3‑compatible operations, all with clear command examples and screenshots.

Raymond Ops
Raymond Ops
Raymond Ops
How to Install and Use MinIO Object Storage with Docker – A Step‑by‑Step Guide

MinIO Overview

MinIO is an open‑source object storage service released under the Apache License v2.0, suitable for storing large amounts of unstructured data such as images, videos, logs, backups, and container or VM images. Objects can range from a few KB up to 5 TB. It is written in Go, provides a web UI, and is S3‑compatible while being lighter than Hadoop HDFS and supporting single‑node deployment.

SDK (API): Official documentation offers SDKs for JavaScript, Java, Python, Go, and .NET.

Distributed Deployment Requirements

All nodes must share the same access key and secret key (export them as environment variables before running minio server).

Disks used by MinIO must be empty.

Node time differences must not exceed 3 seconds.

A distributed deployment requires at least four nodes; otherwise startup will fail.

MinIO supports single‑node, multi‑tenant, and distributed deployments, with both plain and erasure‑coded storage. In single‑node mode you can use the MinIO client for backup.

Installing MinIO with Docker

Pull the MinIO image: docker pull minio/minio Verify the image: docker images Run the container (exposing port 9090, mounting data directories, and naming the container “minio”):

docker run -p 9090:9000 --name minio \
 -v /etc/localtime:/etc/localtime \
 -v /data/minio/data:/data \
 -v /data/minio/config:/root/.minio \
 -d minio/minio server /data

Check running containers and logs:

docker ps
docker logs <container_id>
docker stats <container_id>

Access the web UI at http://172.20.32.232:9090/. Log in with the default credentials:

AccessKey: minioadmin SecretKey: minioadmin

Create a bucket (e.g., “test”) via the “+” button, then upload files.

To generate a shareable link, click the share button; links are valid for up to 7 days and the smallest unit is a minute.

Set a bucket’s access policy (Read‑Only, Write‑Only, Read‑Write) via the “Edit Policy” button; ensure the prefix is “.” for proper access.

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image

MinIO Client (mc)

The MinIO client provides UNIX‑like commands (ls, mb, cp, mirror, diff, find, etc.) for S3‑compatible storage services.

Install the client image: docker pull minio/mc Run the client container interactively: docker run -it --entrypoint=/bin/sh minio/mc Configure a host (replace the IP with your MinIO address):

mc config host add minio http://172.20.32.232:9090 minioadmin minioadmin --api s3v4

Common operations:

# List buckets
mc ls minio
# List objects in a bucket
mc ls minio/test
# Create a bucket
mc mb minio/dnps
# Upload a file
mc cp minio/test/small.jpg minio/dnps/
# Generate a download link
mc share download minio/dnps/small.jpg
# Find files
mc find minio/test --name "*.jpg"
# Set bucket policy
mc policy set download minio/dnps
# Show bucket policy
mc policy list minio/dnps
Image
Image
Image
Image
Image
Image
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIDockerMinioobject storageS3
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.