Docker Website (19) MinIO

0. Introduction

MinIO is a high-performance object storage designed for massive data storage, artificial intelligence, and big data analysis. It is fully compatible with the Amazon S3 interface, and a single object can reach up to 5TB. It is suitable for storing massive pictures, videos, log files, and backups Data and container/VM images etc. MinIO is mainly implemented in Golang language, and the HTTP/HTTPS communication protocol is used between the client and the storage server.

After checking a lot of information, I found that the latest upgrade of MinIO was very big, so I summed up the deployment experience after stepping on the pit.

1 Introduction

As soon as the club has grown, I seem to have been doing privatization:

Self-built network disk, DNS self-built, CDN self-built... All services are hosted on their own servers.

Although Tencent Cloud COS is really easy to use, it is directly exposed that COS will be maxed out sooner or later, and all major forums are precedents; using a CDN access fee can reduce a lot, but Tencent Cloud CDN HTTPS request billing is exactly what I moved out of the service , one of the reasons for self-built CDN.

Then let's build an OSS by ourselves!

2. Installation

Since my cluster is a public network cluster, it is not possible to implement multi-point deployment. The following uses single-point deployment as an example.

If you don't care about using IP+port to access directly, you can directly execute:

Bash
1
2
3
4
5
6
7
docker run -d \
     -p 8080:9000 -p 8090:9090 \ # 8080 8090 can be replaced with the port you want
     --name MinIO \
     -e "MINIO_ROOT_USER=username" \
     -e "MINIO_ROOT_PASSWORD=password" \
     -v /root/minio/data:/data\
     -v /root/minio/config:/root/.minio minio/minio server /data --console-address ":9000" -address ":9090"

If you use the domain name minio.example.com to access the API, use console.example.com to access the console;

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

If you use minio.example.com to access the API, use minio.example.com/console/ to access the console:
Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

If you still want to use DNS-style bucket domain name (for example: bucket-1.oss.example.com, just like the default bucket domain name used by most platforms), you can specify the domain name:
Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

Replace username and password in the command with the password of the root administrator account, and then the console will use this login.

The mount directory /root/minio can also be replaced with the directory you want.

If you use a domain name, use Nginx as a reverse proxy. Note that if the URL specified in the command line uses HTTPS, Nginx still uses HTTP to access MinIO, but you need to configure HTTPS for guest access, and then call the API, access the console, etc. All operations require HTTPS.

3, Error troubleshooting

No matter what error is reported during login, it is likely to be a problem with the API interface. You can enter the container to check:

Bash
1
docker exec -it MinIO /bin/bash

curl the API interface address you set, generally there will be errors similar to those prompted during login, and you can solve them one by one.

4, mount

MinIO supports the S3 protocol, so you can directly generate the key and use the API interface as the endpoint, but if you have not configured the DNS-style of the bucket, more steps are required to mount programs such as Alist:

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

Because MinIO defaults to https://domain name/storage bucket/file format, enabling DNS-style is https://storage bucket.storage bucket domain name/file.

Author
Hsukqi Lee
Posted on

2023-06-22

Edited on

2023-06-22

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet