How to run MinIO as a Docker Container

photo of turned on laptop computer
Reading Time: 4 minutes

What is MinIO?

MinIO is an open-source and high-performance distributed object storage server as a result it is designed for large-scale data infrastructures. In addition, it is compatible with the S3 API hence build from scratch with a private cloud as its target. It’s featuring more than 16000 GitHub stars, and 219 million Docker pulls supported by an active community worldwide.

Why do we need MinIO?

It stores all types of unstructured data such as photos, videos, log files, time-series data, etc,. Moreover, it also excels at traditional object storage, disaster recovery, and archiving.

Therefore, it is unique in overcoming the challenges associated with machine learning, analytics, and cloud-native application workloads. Hence, it stores objects via the HTTP method PUT and accessed via GET, and removed by DELETE.

Therefore, to deploy minIO simply download the binary from GitHub and run it on your server or you can create a service file for the same or run it as a docker container. Moreover, it is a built-in browser that allows you to create buckets, and upload or view objects.

It can be deployed as a standalone, standalone erasure code and distributed erasure code and can be unleashed when you deploy it as a cluster using multiple nodes, and scaling of thousands of nodes is simple.

Features of MinIO

Some features are:-

  • It protects against data hardware failures and silent data corruption using erasure code and bit root protection.
  • It is a high-performance object storage solution.
  • The high performance comes from writing simple and efficient code.
  • Written in GoLang, an elegant programming language created to support high-performance networking and multi-processing.

DEMO

1. You can install MinIO through binary

wget https://dl.min.io/client/mc/release/linux-amd64/mc

chmod +x mc

./mc --help

2. You can also run MinIO as a Docker Container also by setting the user name, password, and port number

docker run -p 9000:9000 -d -p 9001:9001 -e "MINIO_ROOT_USER=minio99" -e "MINIO_ROOT_PASSWORD=minio123" quay.io/minio/minio server /data --console-address ":9001"

3. Set MinIO Client to access the dashboard through the terminal

./mc alias set myminio2 http://localhost:9000 minio99 minio123

myminio2 is the minIO client name

4. Open MinIO Dashboard on localhost:9090

Now, enter your username and password

Some CLI Commands

1. To create a Bucket

mc mb myminio2/(bucket name)
mc mb myminio2/my-bucket

2. Copy items inside my-bucket

mc cp filename myminio2/my-bucket
mc cp chaos-testing.yaml myminio2/my-bucket

3. To represent the text present in a particular file inside the bucket

mc cat myminio2/my-bucket/chaos-testing.yaml

4. To view the first line present in a file inside the bucket

mc head -n 1 myminio2/my-bucket/chaos-testing.yaml

5. To check the total disk usage of the itam present in the bucket

mc du myminio2/my-bucket

6. Copy a specific folder inside the bucket

mc cp --recursive folder name myminio2/my-bucket
mc cp --recursive kafka-docker myminio2/my-bucket

7. Check policy(access permission)of a folder

8. To set access permission

mc policy set public myminio2/my-bucket

9. List out items present inside the bucket

mc ls myminio2/my-bucket
Thses are few cli commands for minIO

Therefore, you can create buckets from the Dashboard itself and upload items inside the bucket.

CONCLUSION

To store your unstructured data try MinIO.

REFERENCES

For more information- Click Here!

Leave a Reply