busybox容器配置北京时间

docker pull busybox:1.32
docker run --rm -v /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime -itd busybox:1.32 sh

image

 

k8s挂载

volumeMounts:
- name: timezone
  mountPath: /etc/localtime
  readOnly: true

volumes:
- name: timezone
  hostPath: 
    path: /usr/share/zoneinfo/Asia/Shanghai
    type: File

 

posted on 2024-03-10 21:37  王景迁  阅读(38)  评论(0)    收藏  举报

导航