How to synchronize the docker container with the system time


Start the mongo container and synchronize the system time


docker run -d --name test -v /etc/localtime:/etc/localtime:ro  mongo


run : Run a command in a new container
--name : Assign a name to the container
-d :   Run container in background and print container ID
-v :  Bind mount a volume


Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.