之前在docker下安装minio一直很顺利,下载镜像后docker run运行镜像指定端口即完成容器创建,但今天在刚下载的镜像上运行容器时出现问题:提示:WARNING: Console endpoint is listening on a dynamic port (3101), please use --console-address ":PORT" to choose a static port。这是docker在提示我们使用静态的固定端口,以避免启动时使用随机端口。但minio一直只用的9000端口,我也在运行命令中指定了端口映射,为什么还会出现这样的提示呢。本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
通过docker官网上的镜像介绍,发现有所变更,之前只有一个端口。现在有两个了。Run the following command to run the latest stable image of MinIO as a container using an ephemeral data volume:本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
podman run \ -p 9000:9000 \ -p 9001:9001 \ minio/minio server /data --console-address ":9001" The MinIO deployment starts using default root credentials minioadmin:minioadmin. You can test the deployment using the MinIO Console, an embedded object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server.本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
从启动的容器可以看到,其已经区分了Console和API两个服务的端口。原来都是共同使用9000,现在需要在启动命令中映射两个端口,然后指定哪个端口做哪项服务。启动命令如下:本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
#新的启动方式 docker run -p 9000:9000,8000:8000 minio server --address '0.0.0.0:9000' --console-address '0.0.0.0:8000' /data #端口指定不对时会报错 ERROR Unable to start the server: --console-address port cannot be same as --address port本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
除此之外,最近版本的minio不再使用MINIO_ACCESS_KEY and MINIO_SECRET_KEY 指定账号密码,改成MINIO_ROOT_USER and MINIO_ROOT_PASSWORD了。见提示:
WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD本文地址:http://www.04007.cn/article/1041.html,未经许可,不得转载.
本文地址:http://www.04007.cn/article/1041.html 未经许可,不得转载. 手机访问本页请扫描右下方二维码.
![]() |
![]() |
手机扫码直接打开本页面 |