Bug 11796 - [Anolis23.2][RC1][docker]容器镜像默认时区设置应为UTC
Summary: [Anolis23.2][RC1][docker]容器镜像默认时区设置应为UTC
Status: CLOSED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: 23.2
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: gaochang
QA Contact:
URL:
Whiteboard:
Keywords: Function
Depends on:
Blocks:
 
Reported: 2024-11-11 14:20 UTC by gitpush
Modified: 2024-12-27 14:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gitpush alibaba_cloud_group 2024-11-11 14:20:38 UTC
描述:
使用镜像:anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images/docker-temp:23.2
测试验证时区用例报错,镜像时区默认UTC,该镜像默认shanghai

执行过程:
docker exec b6adc18e31bbf1d119628923f47c54cb922fccb1659a46280462d1b4536985cb bash -c 'ls /etc/localtime -l

 [stdout] lrwxrwxrwx 1 root root 33 Oct 31 16:01 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai

对比alinux3:

docker exec 9b8ea789814c75d067bafc7ec9f581963d5c6126ce58cfdd0ce310e5accad5f2 bash -c 'ls /etc/localtime -l

[stdout] lrwxrwxrwx 1 root root 23 Nov  5 03:25 /etc/localtime -> /usr/share/zoneinfo/UTC
Comment 1 gaochang alibaba_cloud_group 2024-12-24 11:12:32 UTC
docker pull anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images/docker-temp:23.2-2024122321332725

更新,已修复 UTC 时区问题
Comment 2 yunmeng365524 2024-12-27 14:11:58 UTC
[root@iZbp11vadua25h8mydm72zZ ~]# docker images
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
REPOSITORY                                                                       TAG                    IMAGE ID      CREATED     SIZE
anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images/docker-temp  23.2-2024122321332725  7e76a19636bf  3 days ago  333 MB
[root@iZbp11vadua25h8mydm72zZ ~]# docker run -it 7e76a19636bf bash
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[root@83794d348215 /]# uname -a
Linux 83794d348215 5.10.134-18.al8.x86_64 #1 SMP Fri Dec 13 16:56:53 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
[root@83794d348215 /]#
[root@83794d348215 /]# ls /etc/localtime -l
lrwxrwxrwx 1 root root 23 Dec 23 21:34 /etc/localtime -> /usr/share/zoneinfo/UTC
[root@83794d348215 /]#
已经修改,问题解决关闭