docker minio修改时区问题记录
记录如下
[root@iv-ydi8je5nggxjd1u4r4h6 ~]# docker run -d --restart always -p 9011:9000 -p 9012:9001 --name minio1 -v /opt/gisminio/data:/data -e "MINIO_ROOT_USER=admin" -e "MINIO_ROOT_PASSWORD=cxxx" -e "TZ=Asia/Shanghai" docker.1ms.run/minio/minio server /data --console-address ":9001"
[root@iv-ydi8je5nggxjd1u4r4h6 ~]# docker exec -it d937633dc085 /bin/bash
bash-5.1# date
Tue Nov 19 13:52:12 Asia 2024
bash-5.1# mkdir -p /usr/share/zoneinfo/Asia/
bash-5.1# exit
exit
[root@iv-ydi8je5nggxjd1u4r4h6 ~]# docker cp /usr/share/zoneinfo/Asia/Shanghai minio1:/usr/share/zoneinfo/Asia/
Successfully copied 2.56kB to minio1:/usr/share/zoneinfo/Asia/
[root@iv-ydi8je5nggxjd1u4r4h6 ~]# docker exec -it d937633dc085 /bin/bash
bash-5.1# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
bash-5.1# date
Tue Nov 19 21:58:21 CST 2024
bash-5.1# exit
exit
[root@iv-ydi8je5nggxjd1u4r4h6 ~]#
参考:Minio(官方docker版)容器部署时区问题研究记录_minio region-CSDN博客