Teach you how to use Docker to build Minio on Windows [detailed tutorial]

Table of contents

1What is Minio

2 Install Docker

3Docker Build Minio

4. Create a Minio container and run it

5. Make a visit

6 Problems that may arise in deployment


1What is Minio

        MinIO is an open source-based object storage server. The design goal of MinIO is to provide high-performance, high-availability, and high-reliability object storage services. MinIO can be used as an independent object storage service, and can also be deployed in environments such as Kubernetes and Docker containers.

        The official website of Minio is: https://min.io  The official website introduces its products like this:

        Object storage that can serve artificial intelligence and achieve high performance. MinIO is a high-performance, S3-compatible object store. It is for large-scale AI/ML, data lake, and database workloads. It runs natively on any cloud (public or private), from the data center to the edge. MinIO is software defined and open source under the GNU AGPL v3.

2 Install Docker

Directly refer to the link below, super detailed.

Window11 installation docker Xiaobai tutorial

3Docker Build Minio

3.1 Directly use the command prompt (win+r) cmd to enter, then switch to the D drive (or other drives), and create several files under the D drive letter

mkdir minio  //创建minio文件夹
cd minio 
mkdir data    //创建data文件夹
mkdir config  //创建config文件夹

 3.2 Pull the minio image

input the command

docker pull minio/minio

The following are the steps on how to get the image from the official website

If Docker wants to install software, it must first go to  the Docker  image repository to download the image.

Docker official image https://hub.docker.com/

 make a copy command

3.3 Input and display the following content in the command prompt, indicating that the installation is successful.

3.4 Check all currently downloaded Docker images

docker images

    

3.5 Check the currently running docker container

docker ps

4. Create a Minio container and run it

MinIO The installation and operation can be completed by executing the following commands  :

multiline version

docker run -p 9000:9000 -p 50000:50000 -d --name playedu-minio \
  -e "MINIO_ACCESS_KEY=username" \
  -e "MINIO_SECRET_KEY=password" \
  minio/minio server --console-address ":50000" /data

single line version

docker run -p 9000:9000 -p 50000:50000 -d --name minio  -e "MINIO_ACCESS_KEY=username"  -e "MINIO_SECRET_KEY=password" minio/minio server --console-address ":50000" /data

Explain the above command:

parameter explain
-p 9000:9000 Bind the port of the local machine  9000to  the minio default 9000port of the service, so that the service can be  本地机器ip:9000accessed  through minio . It should be noted that this service is necessary, uploading video files is through  9000 the port
-p 50000:50000 Bind the port of the local machine  50000 to  minio the service  50000 port, so that you can access  本地机器ip:50000 the  minio management service. minio It should be noted that the service  port here  is  determined 50000 by the above command  . --console-address ":50000"So if you need to modify it, you need to modify two places. Also, this service is optional.
-e "MINIO_ACCESS_KEY=username" Specify  minio the default  access_key and also the login user name of the management service. The default value is  username recommended to be modified
-e "MINIO_SECRET_KEY=password" Specify  minio the default  secret_key login password that is also the management service. The default value is  password recommended to be modified

5. Make a visit

Access: http://your domain name: 50000/login, user name: username password: password.

Enter username and password to log in to the minio console, and click Buckets on the left menu:

Click the Create Bulket button on the right, and enter the information in the following figure on the opened page:

Finally, click Create Bulket, and it will jump directly to the file list of the created Bucket, and the Bucket creation is completed here. 

 At this point, the configuration is complete.

6 Problems that may arise in deployment

1 When running the Minio container, an error is reported, and the port number is occupied.

Note: It is possible that the port number is not occupied, it may be a firewall problem, enter the command

netstat -aon | findstr 端口号

Check if it is occupied by other programs. If it is occupied, you can find out the running process information. If not, it means that the port number is not occupied. Then you need to change it to another port number to continue running.

2 When running the Minio container, an error is reported

The container name "/minio" is already in use by container "xxx". You have to remove (or rename) that container to be able to reuse that name.

The container name is currently already taken.

 Solution

  1. To stop and delete the container already using the "minio" name, use the following command: and run again.

docker stop xxx  //停止
docker rm xxx    //移出

Guess you like

Origin blog.csdn.net/m0_64210833/article/details/131209126
Recommended