docker部署minio环境

0.参考文档

https://min.io/docs/minio/container/operations/install-deploy-manage/deploy-minio-single-node-single-drive.html#id4

最开始完全按照官方文档配置,由于我拉的镜像版本较古老,导致按照文档操作会有许多问题,踩了不少坑…
后面参考了别的文章,完成搭建。

1.拉镜像

 docker pull minio/minio:RELEASE.2021-06-17T00-10-46Z

2.配置环境变量

vim /home/user2/wj/minio/default/minio

# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment

MINIO_ROOT_USER=jiew
MINIO_ROOT_PASSWORD=12345678

# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.

MINIO_VOLUMES="/home/user2/wj/minio/data/"

# MINIO_OPTS sets any additional commandline options to pass to the MinIO server.
# For example, `--console-address :9001` sets the MinIO Console listen port
#MINIO_OPTS="--console-address :9001"

# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine

# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).

#MINIO_SERVER_URL="http://minio.example.net:9000"

3.创容器

docker run -dt -p 12280:9000 -p 12281:9001 --name minio\
    -e "MINIO_ACCESS_KEY=jiew" \
  -e "MINIO_SECRET_KEY=12345678" \
  -v /home/user2/wj/minio/data:/data \
  -v /home/user2/wj/minio/default/minio:/root/minio \
  minio/minio:RELEASE.2021-06-17T00-10-46Z server /data

在这里插入图片描述
在这里插入图片描述

pom配置

            <dependency>
                <groupId>io.minio</groupId>
                <artifactId>minio</artifactId>
                <version>8.2.2</version>
            </dependency>

我是用maven做的项目管理,很奇怪mavven load project总不能自动下载minio依赖
最后,手动下载jar包到本地然后mvn安装

https://repo1.maven.org/maven2/io/minio/minio/8.2.2/
mvn install:install-file -Dfile=C:\Users\jiew\.m2\repository\io\minio\minio\minio-8.2.2-all.jar -DgroupId=io.minio -DartifactId=minio -Dversion=8.2.2 -Dpackaging=jar

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值