Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用docker 时,注意的一些坑 (2023-01-09) #41

Open
yaogengzhu opened this issue Jan 9, 2023 · 1 comment
Open

使用docker 时,注意的一些坑 (2023-01-09) #41

yaogengzhu opened this issue Jan 9, 2023 · 1 comment
Labels

Comments

@yaogengzhu
Copy link
Owner

坑点:

  1. 定时任务,服务器本地时间跟docker 容器时间不一致。
@yaogengzhu
Copy link
Owner Author

yaogengzhu commented Jan 10, 2023

  • 第一步进入docker 容器
docker exec -u 0 -it 容器id /bin/bash
  • 第二步修改容器时区,举例子如下
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant