Docker容器与系统时间同步


 description

启动mongo容器,同步系统时间

 command

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

 parameter

run : 在新容器中运行命令
--name : 为容器分配一个名称
-d :  在后台运行容器并打印容器ID
-v :  绑定挂载卷

 result

2d5e865e451456d64647711c60521bfdcf6c...

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.