Use docker to set up Minio file storage

Time:2021-7-29

Create a directory on the management node host to store files and configuration files

mkdir -p /home/data/minio/data
mkdir -p /home/data/minio/config
chmod 777 /home/data/minio/data

External access is required to create a container and upload files. Here, we mapped host port 9001 to container port 9000

docker run -d --restart always \
   -p 9001:9000 --name minio \
   --network my-net \
   -e "MINIO_ACCESS_KEY=BCIAIOSFODNN7EXAMPLE" \
   -e "MINIO_SECRET_KEY=aKalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
   -v /home/data/minio/data -v /home/data/minio/config:/root/.minio minio/minio server /data

MINIO_ ACCESS_ Key and mini_ SECRET_ Key is the certificate for us to access the file storage, which can be set by ourselves.

Browser access:http://192.168.137.200:9001Via access_ Key and secret_ Key login, create an image bucket, and set the read-only access policy.
Use docker to set up Minio file storage
Use docker to set up Minio file storage
Use docker to set up Minio file storage
The configuration file can be uploaded and saved in. Env.

FILESYSTEM_DRIVER=s3
AWS_KEY=BCIAIOSFODNN7EXAMPLE
AWS_SECRET=aKalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_REGION=us-east-1
AWS_URL=http://minio:9000
AWS_BUCKET=image

Just upload a file, you can

http://192.168.137.200:9001/image/ *. JPG visited

PHP microservice training series indexBlog: PHP micro service training series tutorial

This work adoptsCC agreement, reprint must indicate the author and the link to this article