Home >Operation and Maintenance >Docker >How to check the time of docker container
How to check the docker container time:
Enter the container and execute the date command to check the time of the current container:
The date command can display the date in the specified format. Just type date to display the current time in the default format.
Method to modify the container time:
Re-enter the container as follows:
docker run -it --cap-add SYS_TIME --rm --name centos centos / bin/bash
After entering the container, use the following command to modify the container time:
date -s 08/24/2006 date -s 13:02:00
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of How to check the time of docker container. For more information, please follow other related articles on the PHP Chinese website!