Time zone时区问题
Closed this issue · 1 comments
luoluo2001108 commented
HI:
用流水线构建了一个应用,进入容器后发现时区是UTC时区,请问如何更改成东八区的时间呢
root@imom-ui-1f76ab6311-864f77f7d7-zngbl:/# date
Fri Mar 31 01:11:07 UTC 2023
流水线如下,
发现如果流水线中有java这个stage,控制台的时间是正常的,没有java的stage就不是正常的
version: "1.1"
name: ""
cron: 0 3 * * *
stages:
- stage:
- git-checkout:
alias: git-checkout
description: 代码仓库克隆
version: "1.0"
- git-checkout:
- stage:
- custom-script:
alias: custom-script
description: 运行自定义命令
image: centos:7
commands:
- echo "######${{ dirs.git-checkout }}"
- cd /.pipeline/context/git-checkout/ && mkdir www && cd www && cp -r ${{ dirs.git-checkout }}/* /.pipeline/context/git-checkout/www/
- cd /.pipeline/context/git-checkout/www/ && rm -f pipeline.yml && rm -f dice.yml && python changeversion.py && rm -f default.conf && rm -f nginx.conf
- cd ${{ dirs.git-checkout }}/ && ls && sed -i 's:branch:'"${ENV}"':g' dice.yml && cat dice.yml && cp dice.yml /.pipeline/context/git-checkout/
- custom-script:
- stage:
- release:
alias: release
description: 用于打包完成时,向dicehub 提交完整可部署的dice.yml。用户若没在pipeline.yml里定义该action,CI会自动在pipeline.yml里插入该action
params:
dice_yml: /.pipeline/context/git-checkout/dice.yml
services:
imom-ui:
cmd: nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
copys:
- /.pipeline/context/git-checkout/www/:/
- ${{ dirs.git-checkout }}/nginx.conf:/etc/nginx/nginx.conf
- ${{ dirs.git-checkout }}/default.conf:/etc/nginx/default.conf
image: ikisen.com:5000/middleware/nginx:1.14.0
workdir: ${{ dirs.git-checkout }}
- release:
- stage:
- dice:
alias: dice
description: 用于 Erda 平台部署应用服务
params:
release_id: ${release:OUTPUT:releaseID}
- dice:
luoluo2001108 commented
已经解决,把镜像文件的时区改一下即可