Problem background
- Here is how to synchronize the time of the container and the host: https://www.cnblogs.com/poloyy/p/13967532.html
- The second method of use docker cp /etc/localtime [container ID or name]:/etc/localtime reported an error
solution
docker cp /usr/share/zoneinfo/Asia/Shanghai gitlab:/etc/localtime
Restart container
docker restart gitlab
Enter the container for verification
docker exec -it gitlab bash