Docker搭建Minio及永久有效链接配置
搭建Minio
1.拉取镜像
docker pull minio/minio:RELEASE.2021-06-17T00-10-46Z
2. 启动minio
docker run -d -p 9000:9000 --name minio\
-e "MINIO_ACCESS_KEY=admin" \
-e "MINIO_SECRET_KEY=adminminio" \
-v /usr/local/minio/data:/data \
-v /usr/local/minio/config:/root/.minio \
minio/minio:RELEASE.2021-06-17T00-10-46Z server /data
永久有效链接配置
1.Docker 获取 minio/mc容器
docker pull minio/mc:RELEASE.2021-06-13T17-48-22Z
2.Docker 启动 minio/mc容器
docker run -it --entrypoint=/bin/sh minio/mc:RELEASE.2021-06-13T17-48-22Z
3.minio/mc 绑定 minio server服务
mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY> [--api API-SIGNATURE]
mc config host add minio http://IP地址:9000 admin adminminio --api S3v4
绑定成功
4.mc命令
5.设置桶或者目录的访问权限为public(设置公开访问 永久访问链接)
mc policy set public minio/test-bucket/public //将minio中,test-bucket存储桶下的
public目录设置为公开可访问
mc policy set public minio/test-bucket2 //将minio中,test-bucket2存储桶设置为公开可访问
mc policy set public minio/test
mc policy set public minio/test
http://IP地址:9000/test/demo.png